Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "darklord", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"author": "Gregory Pratt <gregory.pratt@me.com> (http://grumpywizards.com)", | ||
@@ -5,0 +5,0 @@ "description": "Stateless JWT based authentication", |
@@ -138,11 +138,11 @@ ## DarkLord - JWT based stateless authentication | ||
router.get('/profile', function () { | ||
router.get('/access', function (req, res) { | ||
authSvc | ||
.hasAccess() | ||
.hasAccess(req, res) | ||
.then(function () { | ||
// Authenticated | ||
res.status(200).end(); | ||
}, function () { | ||
// Not authenticated | ||
res.status(401).end(); | ||
}); | ||
}); | ||
}); | ||
@@ -149,0 +149,0 @@ ##### Technology Used |
@@ -32,2 +32,11 @@ var responses = require('./utils/responses'); | ||
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.post('/register', authSvc.register); | ||
@@ -45,2 +54,3 @@ opts.router.post('/forgot', forgotPassword); | ||
authenticate: authSvc.authenticate, | ||
hasAccess: authSvc.hasAccess, | ||
isAuthenticated: authSvc.isAuthenticated, | ||
@@ -47,0 +57,0 @@ forgotPassword: authSvc.forgotPassword, |
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
17698
388