Verifies the token and will return a 401 if a valid JWT bearer token is not provided in the request.
This uses the IJwtVerifierOptions.jwksUri to get puclic keys from the Authorization Server Metadata and verifies the token using IJwtVerifierOptions.issuer, IJwtVerifierOptions.audience and IJwtVerifierOptions.tokenSigningAlg.
Token to verify
Class to verify the token.
Since it is agnostic to the framework, it needs to be called within a middleware.
Example:
If IJwtVerifierOptions.tokenSigningAlg is not provieded by default is 'RS256'