hapi-auth-jwt2
Advanced tools
Comparing version 5.0.4 to 5.0.6
@@ -44,6 +44,8 @@ var Hapi = require('hapi'); | ||
// see: http://hapijs.com/api#serverauthschemename-scheme | ||
server.auth.strategy('jwt', 'jwt', true, | ||
server.auth.strategy('jwt', 'jwt', | ||
{ key: secret, validateFunc: validate, | ||
verifyOptions: { ignoreExpiration: true } | ||
}); | ||
server.auth.default('jwt'); | ||
@@ -50,0 +52,0 @@ server.route([ |
@@ -31,6 +31,8 @@ var Hapi = require('hapi'); | ||
server.auth.strategy('jwt', 'jwt', true, | ||
server.auth.strategy('jwt', 'jwt', | ||
{ key: 'NeverShareYourSecret', // Never Share your secret key | ||
validateFunc: validate // validate function defined above | ||
}); | ||
server.auth.default('jwt'); | ||
@@ -37,0 +39,0 @@ server.route([ |
{ | ||
"name": "hapi-auth-jwt2", | ||
"version": "5.0.4", | ||
"version": "5.0.6", | ||
"description": "Hapi.js Authentication Plugin/Scheme using JSON Web Tokens (JWT)", | ||
@@ -38,8 +38,5 @@ "main": "lib/index.js", | ||
}, | ||
"peerDependencies": { | ||
"hapi": ">=9.x.x" | ||
}, | ||
"devDependencies": { | ||
"aguid": "^1.0.3", | ||
"hapi": "^9.0.4", | ||
"hapi": "^9.3.0", | ||
"codeclimate-test-reporter": "^0.1.0", | ||
@@ -46,0 +43,0 @@ "istanbul": "^0.3.19", |
@@ -9,3 +9,3 @@ # Hapi Auth with JSON Web Tokens (JWT) | ||
[](https://codeclimate.com/github/dwyl/hapi-auth-jwt2) | ||
[](http://hapijs.com) | ||
[](http://hapijs.com) | ||
[](http://nodejs.org/download/) | ||
@@ -77,3 +77,3 @@ [](https://www.npmjs.com/package/hapi-auth-jwt2) | ||
server.auth.strategy('jwt', 'jwt', true, | ||
server.auth.strategy('jwt', 'jwt', | ||
{ key: 'NeverShareYourSecret', // Never Share your secret key | ||
@@ -84,2 +84,4 @@ validateFunc: validate, // validate function defined above | ||
server.auth.default('jwt'); | ||
server.route([ | ||
@@ -305,5 +307,11 @@ { | ||
> *If you have a question*, ***please post an issue/question on GitHub***: | ||
https://github.com/dwyl/hapi-auth-jwt2/issues | ||
### Compatibility | ||
`hapi-auth-jwt2` is compatible with *both* Hapi `9.x.x` and `8.x.x` however we | ||
*recommend* using the [*latest version*](https://github.com/hapijs/hapi/) of Hapi for security/performance updates. | ||
> *If you have a question*, ***please post an issue/question on | ||
GitHub***: https://github.com/dwyl/hapi-auth-jwt2/issues *or* | ||
[](https://gitter.im/dwyl/chat/?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
<br /> | ||
@@ -310,0 +318,0 @@ <br /> |
69175
3
1257
429