Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

darklord

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

darklord - npm Package Compare versions

Comparing version 1.1.4 to 1.2.0

2

package.json
{
"name": "darklord",
"version": "1.1.4",
"version": "1.2.0",
"author": "Gregory Pratt <gregory.pratt@me.com> (http://grumpywizards.com)",

@@ -5,0 +5,0 @@ "description": "Stateless JWT based authentication",

@@ -207,2 +207,10 @@ var Cookies = require('cookies');

function logout(req, res) {
if (activateCookie) {
// Remove the cookie
var cookies = new Cookies(req, res, cookiekKeys);
cookies.set('darklord', null, { signed: true });
}
}
function generateToken(req, res, user) {

@@ -227,4 +235,3 @@ // When to force a new manual login

expires: expiryDate,
signed: true,
httpOnly: false
signed: true
});

@@ -248,4 +255,5 @@ }

verifyEmail: verifyEmail,
extendToken: extendToken
extendToken: extendToken,
logout: logout
};
};

@@ -31,12 +31,19 @@ var responses = require('./utils/responses');

function hasAccess(req, res) {
authSvc
.hasAccess(req, res)
.then(function () {
res.status(200).end();
}, function () {
res.status(401).end();
});
}
function logout(req, res) {
authSvc.logout(req, res);
res.status(200).end();
}
if (opts.router) {
opts.router.get('/access', function (req, res) {
authSvc
.hasAccess(req, res)
.then(function () {
res.status(200).end();
}, function () {
res.status(401).end();
});
});
opts.router.get('/access', hasAccess);
opts.router.post('/register', authSvc.register);

@@ -49,2 +56,3 @@ opts.router.post('/forgot', forgotPassword);

opts.router.put('/change', authSvc.isAuthenticated, changePassword);
opts.router.post('/logout', logout);
}

@@ -61,4 +69,5 @@

verifyEmail: authSvc.verifyEmail,
extendToken: authSvc.extendToken
extendToken: authSvc.extendToken,
logout: authSvc.logout
};
};
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