AuthorizationMessageHandler Class

Definition

A DelegatingHandler that attaches access tokens to outgoing HttpResponseMessage instances. Access tokens will only be added when the request URI is within one of the base addresses configured using ConfigureHandler(IEnumerable<String>, IEnumerable<String>, String).

C#
public class AuthorizationMessageHandler : System.Net.Http.DelegatingHandler
C#
public class AuthorizationMessageHandler : System.Net.Http.DelegatingHandler, IDisposable
Inheritance
AuthorizationMessageHandler
Derived
Implements

Constructors

Methods

ConfigureHandler(IEnumerable<String>, IEnumerable<String>, String)

Configures this handler to authorize outbound HTTP requests using an access token. The access token is only attached if at least one of authorizedUrls is a base of RequestUri.

SendAsync(HttpRequestMessage, CancellationToken)

Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.

Explicit Interface Implementations

Applies to

Product Versions
ASP.NET Core 3.1, 5.0, 6.0, 7.0, 8.0, 9.0