mirror of
https://github.com/hanzoai/passport-jwt.git
synced 2026-09-24 17:01:40 +00:00
Moves the logic that calls secretOrKeyProvider out of verify_jwt.js and back into lib/strategy.js. verify_jwt.js was intended to be a simple call-through function for the real verfier from jsonwebtoken. Changes the signature of secretOrKeyProvider to (request, token, done) from (token, done) to support a wider range of use cases. Updates tests for the above behavior.
6 lines
169 B
JavaScript
6 lines
169 B
JavaScript
var jwt = require('jsonwebtoken');
|
|
|
|
module.exports = function(token, secretOrKey, options, callback) {
|
|
return jwt.verify(token, secretOrKey, options, callback);
|
|
};
|