BearerTokenAuthenticationPolicy
A policy that sends an AccessToken provided by a TokenCredential as an Authentication header.
Creates a new instance of BearerTokenAuthenticationPolicy using provided token credential and scope to authenticate for.
Creates a new instance of BearerTokenAuthenticationPolicy using provided token credential and scopes to authenticate for.
Sets the Authorization header on the Request by calling GetToken, or from cache, if possible.
protected ValueTask AuthenticateAndAuthorizeRequestAsync(HttpMessage message, TokenRequestContext context)
Sets the Authorization header on the Request by calling GetToken, or from cache, if possible.
Executes before ProcessAsync or
Process is called.
Implementers of this method are expected to call AuthenticateAndAuthorizeRequest or AuthenticateAndAuthorizeRequestAsync
if authorization is required for requests not related to handling a challenge response.
Executes before ProcessAsync or
Process is called.
Implementers of this method are expected to call AuthenticateAndAuthorizeRequest or AuthenticateAndAuthorizeRequestAsync
if authorization is required for requests not related to handling a challenge response.
Executed in the event a 401 response with a WWW-Authenticate authentication challenge header is received after the initial request.
The default implementation will attempt to handle Continuous Access Evaluation (CAE) claims challenges.
Executed in the event a 401 response with a WWW-Authenticate authentication challenge header is received after the initial request.
The default implementation will attempt to handle Continuous Access Evaluation (CAE) claims challenges.