Creates a new JWT Auth middleware
Checks for an authentication token, saves its content to event.auth and throws errors if anything fishy goes on. It will pass if no authorization header is present, but will ensure that event.auth is undefined in those cases. Authorization or authorization headers will both be checked. If both exist, the middleware will throw an error. If options.tokenSource is set, then that function will be used to retrieve the token and Headers will serve as fallback.
The event to check
Private
Readonly
logger
The logger used in the module
Private
options
Private
getExtracts a token from an authorization header.
Private
getExtracts a token from a source defined in the options.
Static
create
The actual middleware