Socket
Socket
Sign inDemoInstall

hapi-auth-cookie

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-auth-cookie - npm Package Compare versions

Comparing version 2.0.0-rc2 to 2.0.0

2

package.json
{
"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();
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc