hapi-auth-jwt2
Advanced tools
Comparing version 4.7.0 to 4.7.1
@@ -33,2 +33,5 @@ // Load modules | ||
} // JWT tokens in cookie: https://github.com/dwyl/hapi-auth-jwt2/issues/55 | ||
else if (request.headers.authorization) { | ||
auth = request.headers.authorization; | ||
} | ||
else if (request.headers.cookie) { | ||
@@ -41,5 +44,2 @@ var cookie = request.headers.cookie.replace(/token=/gi, ''); | ||
} | ||
else { | ||
auth = request.headers.authorization; | ||
} | ||
if (!auth && (request.auth.mode === 'optional' || request.auth.mode === 'try')) { | ||
@@ -46,0 +46,0 @@ return reply.continue({ credentials: {} }); |
{ | ||
"name": "hapi-auth-jwt2", | ||
"version": "4.7.0", | ||
"version": "4.7.1", | ||
"description": "Hapi.js Authentication Plugin/Scheme using JSON Web Tokens (JWT)", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -274,3 +274,3 @@ # Hapi Auth with JSON Web Tokens (JWT) | ||
### Backgroun Reading | ||
### Background Reading | ||
@@ -277,0 +277,0 @@ + Wikipedia has a good intro (general): https://en.wikipedia.org/wiki/HTTP_cookie |
@@ -23,3 +23,3 @@ var test = require('tape'); | ||
}; | ||
console.log(options); | ||
server.inject(options, function(response) { | ||
@@ -26,0 +26,0 @@ t.equal(response.statusCode, 401, "Invalid token should error!"); |
53825
888