If anonymous access is allowed, this value will be passed to req.user
, defaults to null
.
Provide a function that returns a user by its id.
Authorization header name, defaults to Authorization
Add options to the jsonwebtoken.verify
call.
Will only be used if you do not provide your own decodeToken function.
The private or public secret that will be passed to the jsonwebtoken.verify
call.
Will only be used if you do not provide your own decodeToken function.
The name of the key that contains the user id in the decoded token.
Override the default unauthorized responding behaviour.
Generated using TypeDoc
Enable if unauthorized access should still be possible and the middleware should populate the request with user information.