Share via


PopTokenAuthenticationPolicy Class

Definition

A policy that supports Proof of Possession (PoP) tokens.

public class PopTokenAuthenticationPolicy : Azure.Core.Pipeline.HttpPipelinePolicy
type PopTokenAuthenticationPolicy = class
    inherit HttpPipelinePolicy
Public Class PopTokenAuthenticationPolicy
Inherits HttpPipelinePolicy
Inheritance
PopTokenAuthenticationPolicy

Constructors

PopTokenAuthenticationPolicy(ISupportsProofOfPossession, String)

Creates a new instance of PopTokenAuthenticationPolicy.

Methods

AuthenticateAndAuthorizeRequest(HttpMessage, PopTokenRequestContext)

Sets the Authorization header on the Request by calling GetToken, or from cache, if possible.

AuthenticateAndAuthorizeRequestAsync(HttpMessage, PopTokenRequestContext)

Sets the Authorization header on the Request by calling GetToken, or from cache, if possible.

AuthorizeRequest(HttpMessage)

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.

AuthorizeRequestAsync(HttpMessage)

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

AuthorizeRequestOnChallenge(HttpMessage)

Executed in the event a 401 response with a WWW-Authenticate authentication challenge header is received after the initial request.

AuthorizeRequestOnChallengeAsync(HttpMessage)

Executed in the event a 401 response with a WWW-Authenticate authentication challenge header is received after the initial request.

Process(HttpMessage, ReadOnlyMemory<HttpPipelinePolicy>)

Applies the policy to the message. Implementers are expected to mutate Request before calling ProcessNextAsync(HttpMessage, ReadOnlyMemory<HttpPipelinePolicy>) and observe the Response changes after.

ProcessAsync(HttpMessage, ReadOnlyMemory<HttpPipelinePolicy>)

Applies the policy to the message. Implementers are expected to mutate Request before calling ProcessNextAsync(HttpMessage, ReadOnlyMemory<HttpPipelinePolicy>) and observe the Response changes after.

Applies to