Class PopTokenAuthenticationPolicy
java.lang.Object
com.azure.core.experimental.credential.PopTokenAuthenticationPolicy
- All Implemented Interfaces:
HttpPipelinePolicy
The Pop token authentication policy for use with Azure SDK clients.
-
Constructor Summary
ConstructorsConstructorDescriptionPopTokenAuthenticationPolicy(TokenCredential credential, String... scopes) Creates a new instance of the PopTokenAuthenticationPolicy. -
Method Summary
Modifier and TypeMethodDescriptionauthorizeRequest(HttpPipelineCallContext context) Authorizes the request.authorizeRequestOnChallenge(HttpPipelineCallContext context, HttpResponse response) Authorizes the request on challenge.booleanauthorizeRequestOnChallengeSync(HttpPipelineCallContext context, HttpResponse response) Authorizes the request on challenge synchronously.voidAuthorizes the request synchronously.process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) Processes the request.processSync(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next) Processes the request synchronously.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.core.http.policy.HttpPipelinePolicy
getPipelinePosition
-
Constructor Details
-
PopTokenAuthenticationPolicy
Creates a new instance of the PopTokenAuthenticationPolicy.- Parameters:
credential- The credential to use for authentication.scopes- The scopes required for the token.
-
-
Method Details
-
authorizeRequest
Authorizes the request. -
authorizeRequestSync
Authorizes the request synchronously.- Parameters:
context- The context of the request.
-
authorizeRequestOnChallenge
public Mono<Boolean> authorizeRequestOnChallenge(HttpPipelineCallContext context, HttpResponse response) Authorizes the request on challenge. -
authorizeRequestOnChallengeSync
public boolean authorizeRequestOnChallengeSync(HttpPipelineCallContext context, HttpResponse response) Authorizes the request on challenge synchronously.- Parameters:
context- The context of the request.response- The response of the request.- Returns:
- A
Booleanindicating if the request was authorized.
-
process
Processes the request.- Specified by:
processin interfaceHttpPipelinePolicy- Parameters:
context- The context of the request.next- The next policy in the pipeline.- Returns:
- A
Monocontaining theHttpResponse.
-
processSync
Processes the request synchronously.- Specified by:
processSyncin interfaceHttpPipelinePolicy- Parameters:
context- The context of the request.next- The next policy in the pipeline.- Returns:
- The
HttpResponse.
-