@trustflight/authentication-jwt-npm
v1.2.0
Published
Authentication JWT NPM
Keywords
Readme
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>)
