Class AccessTokenAuthorizationHttpMessageHandler
A DelegatingHandler that adds an Authorization header using the scheme
Bearer and the value of the currently held OIDC access token for the authenticated
user.
public class AccessTokenAuthorizationHttpMessageHandler : AuthorizedHttpMessageHandler, IDisposable
- Inheritance
-
AccessTokenAuthorizationHttpMessageHandler
- Implements
- Inherited Members
Constructors
AccessTokenAuthorizationHttpMessageHandler(IAccessTokenProvider)
Initializes a new instance of the class.
public AccessTokenAuthorizationHttpMessageHandler(IAccessTokenProvider accessTokenProvider)
Parameters
accessTokenProviderIAccessTokenProviderService to retrieve the currently held OIDC access token for the authenticated user.
Exceptions
- ArgumentNullException
The
accessTokenProviderwasnull.
Methods
GetAuthorizationValueAsync()
The value for the authorization header.
protected override Task<string> GetAuthorizationValueAsync()