If anonymous access is allowed, this value will be passed to req.user
, defaults to null
.
If the provided function evaluates to true access will be granted. It will be passed the header value and request object.
Authorization header name, defaults to Authorization
For convenience only, remove provided string/pattern from the header value before it's passed to your auth handler.
Trim the header value before it's passed to your auth handler.'
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.