mikenicholson / passport-jwt

Passport authentication using JSON Web Tokens
MIT License
1.96k stars 213 forks source link

Adding ES6 Defaults for AUTH_HEADER #181

Closed JemiloII closed 4 years ago

JemiloII commented 5 years ago

https://github.com/mikenicholson/passport-jwt/blob/6b92631dfbde7143b9e046093dbf332107bce82e/lib/extract_jwt.js#L16

New to the project, but I thought this would be useful. extractors.fromHeader = function (header_name = AUTH_HEADER) {

This way we could simply user ExtractJWT.fromHeader() without needing to type 'authorization'

mikenicholson commented 4 years ago

see fromAuthHeader* extractor functions. in extract_jwt.js