@@ -11,10 +11,10 @@ var passport = require('passport-strategy')
11
11
*
12
12
* @param options
13
13
* secretOrKey: String or buffer containing the secret or PEM-encoded public key. Required unless secretOrKeyProvider is provided.
14
- * secretOrKeyProvider: callback in the format secretOrKeyProvider(request, token , done)`,
14
+ * secretOrKeyProvider: callback in the format secretOrKeyProvider(request, rawJwtToken , done)`,
15
15
* which should call done with a secret or PEM-encoded public key
16
- * (asymmetric) for the given token and request combination. done
17
- * has the signature function done(err, secret).
16
+ * (asymmetric) for the given undecoded jwt token string and request
17
+ * combination. done has the signature function done(err, secret).
18
18
* REQUIRED unless `secretOrKey` is provided.
19
19
* jwtFromRequest: (REQUIRED) Function that accepts a reqeust as the only parameter and returns the either JWT as a string or null
20
20
* issuer: If defined issuer will be verified against this value
@@ -36,7 +36,7 @@ function JwtStrategy(options, verify) {
36
36
if ( this . _secretOrKeyProvider ) {
37
37
throw new TypeError ( 'JwtStrategy has been given both a secretOrKey and a secretOrKeyProvider' ) ;
38
38
}
39
- this . _secretOrKeyProvider = function ( request , token , done ) {
39
+ this . _secretOrKeyProvider = function ( request , rawJwtToken , done ) {
40
40
done ( null , options . secretOrKey )
41
41
} ;
42
42
}
0 commit comments