1.2.0 • Published 2 years ago

@trustflight/authentication-jwt-npm v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

How to use: const AuthService = require("@trustflight/authentication-jwt-npm"); server.use(AuthService.authenticationJWT());

  • Will validate JWT token (JWT source, request authorization header, or authorization 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>)