共用方式為


BearerTokenAuthenticationPolicy.AuthorizeRequestAsync(HttpMessage) Method

Definition

Executes before ProcessAsync(HttpMessage, ReadOnlyMemory<HttpPipelinePolicy>) or Process(HttpMessage, ReadOnlyMemory<HttpPipelinePolicy>) is called. Implementers of this method are expected to call AuthenticateAndAuthorizeRequest(HttpMessage, TokenRequestContext) or AuthenticateAndAuthorizeRequestAsync(HttpMessage, TokenRequestContext) if authorization is required for requests not related to handling a challenge response.

protected virtual System.Threading.Tasks.ValueTask AuthorizeRequestAsync (Azure.Core.HttpMessage message);
abstract member AuthorizeRequestAsync : Azure.Core.HttpMessage -> System.Threading.Tasks.ValueTask
override this.AuthorizeRequestAsync : Azure.Core.HttpMessage -> System.Threading.Tasks.ValueTask
Protected Overridable Function AuthorizeRequestAsync (message As HttpMessage) As ValueTask

Parameters

message
HttpMessage

The HttpMessage this policy would be applied to.

Returns

The ValueTask representing the asynchronous operation.

Applies to