Class ArmChallengeAuthenticationPolicy
- java.lang.Object
-
- com.azure.core.http.policy.BearerTokenAuthenticationPolicy
-
- com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy
-
- All Implemented Interfaces:
HttpPipelinePolicy
public class ArmChallengeAuthenticationPolicy extends BearerTokenAuthenticationPolicy
The pipeline policy that applies a token credential to an HTTP request with "Bearer" scheme in ARM challenge based authentication scenarios.
-
-
Constructor Summary
Constructors Constructor Description ArmChallengeAuthenticationPolicy(TokenCredential credential, String... scopes)Creates ArmChallengeAuthenticationPolicy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<Void>authorizeRequest(HttpPipelineCallContext context)Mono<Boolean>authorizeRequestOnChallenge(HttpPipelineCallContext context, HttpResponse response)String[]getScopes(HttpPipelineCallContext context, String[] scopes)Gets the scopes for the specific request.-
Methods inherited from class com.azure.core.http.policy.BearerTokenAuthenticationPolicy
process, setAuthorizationHeader
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.azure.core.http.policy.HttpPipelinePolicy
getPipelinePosition
-
-
-
-
Constructor Detail
-
ArmChallengeAuthenticationPolicy
public ArmChallengeAuthenticationPolicy(TokenCredential credential, String... scopes)
Creates ArmChallengeAuthenticationPolicy.- Parameters:
credential- the token credential to authenticate the requestscopes- the scopes used in credential, using default scopes when empty
-
-
Method Detail
-
authorizeRequest
public Mono<Void> authorizeRequest(HttpPipelineCallContext context)
- Overrides:
authorizeRequestin classBearerTokenAuthenticationPolicy
-
authorizeRequestOnChallenge
public Mono<Boolean> authorizeRequestOnChallenge(HttpPipelineCallContext context, HttpResponse response)
- Overrides:
authorizeRequestOnChallengein classBearerTokenAuthenticationPolicy
-
getScopes
public String[] getScopes(HttpPipelineCallContext context, String[] scopes)
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.
-
-