Class ArmChallengeAuthenticationPolicy
java.lang.Object
com.azure.core.http.policy.BearerTokenAuthenticationPolicy
com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy
- All Implemented Interfaces:
HttpPipelinePolicy
The pipeline policy that applies a token credential to an HTTP request with "Bearer" scheme in ARM challenge based
authentication scenarios.
-
Constructor Summary
ConstructorsConstructorDescriptionArmChallengeAuthenticationPolicy(TokenCredential credential, String... scopes) Creates ArmChallengeAuthenticationPolicy. -
Method Summary
Modifier and TypeMethodDescriptionauthorizeRequest(HttpPipelineCallContext context) authorizeRequestOnChallenge(HttpPipelineCallContext context, HttpResponse response) booleanauthorizeRequestOnChallengeSync(HttpPipelineCallContext context, HttpResponse response) voidString[]getScopes(HttpPipelineCallContext context, String[] scopes) Gets the scopes for the specific request.Methods inherited from class com.azure.core.http.policy.BearerTokenAuthenticationPolicy
process, processSync, setAuthorizationHeader, setAuthorizationHeaderSyncMethods 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
-
ArmChallengeAuthenticationPolicy
Creates ArmChallengeAuthenticationPolicy.- Parameters:
credential- the token credential to authenticate the requestscopes- the scopes used in credential, using default scopes when empty
-
-
Method Details
-
authorizeRequest
- Overrides:
authorizeRequestin classBearerTokenAuthenticationPolicy
-
authorizeRequestSync
- Overrides:
authorizeRequestSyncin classBearerTokenAuthenticationPolicy
-
authorizeRequestOnChallenge
public Mono<Boolean> authorizeRequestOnChallenge(HttpPipelineCallContext context, HttpResponse response) - Overrides:
authorizeRequestOnChallengein classBearerTokenAuthenticationPolicy
-
authorizeRequestOnChallengeSync
public boolean authorizeRequestOnChallengeSync(HttpPipelineCallContext context, HttpResponse response) - Overrides:
authorizeRequestOnChallengeSyncin classBearerTokenAuthenticationPolicy
-
getScopes
Gets the scopes for the specific request.- Parameters:
context- The request.scopes- Default scopes used by the policy.- Returns:
- The scopes for the specific request.
-