2.0.0 • Published 8 years ago
jwt-parser v2.0.0
jwt-parser
Generic JWT Authorization header field parser for whatever.
Installation
$ npm install jwt-parserAPI
var auth = require('jwt-parser')auth(req, secret)
Get the JWT payload from the given request. JWT secret also required so
it can decode and get payload correctly. The Authorization
header is parsed and if the header is invalid, undefined is returned,
otherwise will return decode jwt payload.
Example
var auth = require('jwt-parser');
var user = auth(req, secret);