1.2.0 • Published 3 years ago
@trustflight/authentication-jwt-npm v1.2.0
How to use:
const AuthService = require("@trustflight/authentication-jwt-npm");
server.use(AuthService.authenticationJWT());
- Will validate JWT token (JWT source, request
authorization header, orauthorization cookie) - authorization header name can be passed as a parameter
AuthService.authenticationJWT(<header name >) - JWT signature validation use secure key from environment variable `
jwtSecret ` - Create new JWT
AuthService.createJWT(<token body payload>)
1.2.0
3 years ago