we-plugin-passport-jwt
v1.1.1
Published
JWT authentication strategy plugin for We.js
Downloads
5
Readme
we-plugin-passport-jwt
JWT authentication strategy plugin for We.js build with jsonwebtoken and passport-jwt
Installation
we i we-plugin-passport-jwt
Configuration
Documentation about configuration:
See:
- https://www.npmjs.com/package/passport-jwt
- https://www.npmjs.com/package/jsonwebtoken
// ---
passport: {
strategies: {
// session
jwt: {
secretOrKey: null, // REQUIRED!
// optional configs:
algorithm: 'HS256',
audience: null, // will be set after load all plugins
issuer: 'wejs.org',
jwtid: null,
subject: null,
noTimestamp: null,
header: null,
expiresIn: 10080, // in seconds
session: false,
}
}
},
// ---
routes:
Authenticate and get token:
post /auth/jwt/authenticate
Post email and password to /auth/jwt/authenticate.
Links
- We.js site: http://wejs.org
NPM Info:
License
Under the MIT license.