hapi-auth-cookie
Advanced tools
Comparing version 2.0.0-rc2 to 2.0.0
{ | ||
"name": "hapi-auth-cookie", | ||
"description": "Cookie authentication plugin", | ||
"version": "2.0.0-rc2", | ||
"version": "2.0.0", | ||
"repository": "git://github.com/hapijs/hapi-auth-cookie", | ||
@@ -6,0 +6,0 @@ "main": "index", |
@@ -140,5 +140,6 @@ ### hapi-auth-cookie | ||
var server = new Hapi.Server('localhost', 8000); | ||
var server = new Hapi.Server(); | ||
server.connection({ port: 8000 }); | ||
server.pack.register(require('hapi-auth-cookie'), function (err) { | ||
server.register(require('hapi-auth-cookie'), function (err) { | ||
@@ -151,41 +152,41 @@ server.auth.strategy('session', 'cookie', { | ||
}); | ||
}); | ||
server.route([ | ||
{ | ||
method: 'GET', | ||
path: '/', | ||
config: { | ||
handler: home, | ||
auth: 'session' | ||
} | ||
}, | ||
{ | ||
method: ['GET', 'POST'], | ||
path: '/login', | ||
config: { | ||
handler: login, | ||
auth: { | ||
mode: 'try', | ||
strategy: 'session' | ||
}, | ||
plugins: { | ||
'hapi-auth-cookie': { | ||
redirectTo: false | ||
} | ||
server.route([ | ||
{ | ||
method: 'GET', | ||
path: '/', | ||
config: { | ||
handler: home, | ||
auth: 'session' | ||
} | ||
}, | ||
{ | ||
method: ['GET', 'POST'], | ||
path: '/login', | ||
config: { | ||
handler: login, | ||
auth: { | ||
mode: 'try', | ||
strategy: 'session' | ||
}, | ||
plugins: { | ||
'hapi-auth-cookie': { | ||
redirectTo: false | ||
} | ||
} | ||
}, | ||
{ | ||
method: 'GET', | ||
path: '/logout', | ||
config: { | ||
handler: logout, | ||
auth: 'session' | ||
} | ||
} | ||
]); | ||
}, | ||
{ | ||
method: 'GET', | ||
path: '/logout', | ||
config: { | ||
handler: logout, | ||
auth: 'session' | ||
} | ||
} | ||
]); | ||
server.start(); | ||
}); | ||
server.start(); | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
191
0
68087