hapi-auth-bearer-simple
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -10,3 +10,3 @@ 'use strict'; | ||
internals.validateCallback = function (err, isValid, credentials, reply) { | ||
internals.validateCallback = function (err, isValid, credentials, token, reply) { | ||
@@ -34,3 +34,4 @@ if (err) { | ||
credentials.token = internals.token; | ||
credentials.token = token; | ||
return reply.continue({ | ||
@@ -62,14 +63,14 @@ credentials: credentials | ||
internals.token = headerParts[1]; | ||
var token = headerParts[1]; | ||
// use provided validate function to return | ||
if (settings.exposeRequest) { | ||
settings.validateFunction(internals.token, request, function (err, isValid, credentials) { | ||
settings.validateFunction(token, request, function (err, isValid, credentials) { | ||
internals.validateCallback(err, isValid, credentials, reply); | ||
internals.validateCallback(err, isValid, credentials, token, reply); | ||
}); | ||
} else { | ||
settings.validateFunction(internals.token, function (err, isValid, credentials) { | ||
settings.validateFunction(token, function (err, isValid, credentials) { | ||
internals.validateCallback(err, isValid, credentials, reply); | ||
internals.validateCallback(err, isValid, credentials, token, reply); | ||
}); | ||
@@ -76,0 +77,0 @@ } |
{ | ||
"name": "hapi-auth-bearer-simple", | ||
"description": "Custom authentication plugin for Hapi using Bearer tokens", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"author": "Adri Van Houdt <adri@salesflare.com>", | ||
@@ -23,15 +23,15 @@ "private": false, | ||
"dependencies": { | ||
"boom": "2.x.x", | ||
"hoek": "2.x.x" | ||
"boom": "2.9.0", | ||
"hoek": "2.16.3" | ||
}, | ||
"devDependencies": { | ||
"lab": "5.x.x", | ||
"code": "1.x.x", | ||
"hapi": "8.x.x" | ||
"lab": "6.1.0", | ||
"code": "1.5.0", | ||
"hapi": "10.4.0" | ||
}, | ||
"peerDependencies": { | ||
"hapi": ">=8.x.x" | ||
"hapi": ">=10.x.x" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.33" | ||
"node": ">=0.10.40" | ||
}, | ||
@@ -38,0 +38,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
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
18924
+ Addedboom@2.9.0(transitive)
- Removedboom@2.10.1(transitive)
Updatedboom@2.9.0
Updatedhoek@2.16.3