JWT authentication strategy plugin for We.js build with jsonwebtoken and passport-jwt
we i we-plugin-passport-jwt
Documentation about configuration:
See:
// ---
passport: {
strategies: {
// session
jwt: {
secretOrKey: null, // REQUIRED!
// optional configs:
algorithm: 'HS256',
audience: null, // will be set after load all plugins
issuer: 'wejs.org',
//jwtid: undefined,
//subject: undefined,
//noTimestamp: undefined,
//header: undefined,
expiresIn: 10080, // in seconds
session: false,
}
}
},
// ---
post /auth/jwt/authenticate
Post email and password to /auth/jwt/authenticate.
Under the MIT license.