auth0 / node-oauth2-jwt-bearer

Monorepo for libraries that protect Node APIs with OAuth2 Bearer JWTs
MIT License
91 stars 30 forks source link

Allow to specify the location of the token. #147

Open az-nextsec opened 4 months ago

az-nextsec commented 4 months ago

Checklist

Describe the problem you'd like to have solved

Currently the token is automatically looked up in query, body and header. I want to disallow token to be supplied in anything OTHER than header, but it doesn't seem possible now.

Describe the ideal solution

Extend JwtVerifierOptions to allow us to specify the locations where to look for the token.

Alternatives and current workarounds

None discovered. Potentially writing a custom auth Handler wrapping jwtverifier?

Additional context

No response