Files
Mike Nicholson a236e4018e Cleanup of PR #108.
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.
2017-07-27 23:32:04 -04:00

6 lines
169 B
JavaScript

var jwt = require('jsonwebtoken');
module.exports = function(token, secretOrKey, options, callback) {
return jwt.verify(token, secretOrKey, options, callback);
};