public class ArmChallengeAuthenticationPolicy extends BearerTokenAuthenticationChallengePolicy
Constructor and Description |
---|
ArmChallengeAuthenticationPolicy(TokenCredential credential,
com.azure.core.experimental.implementation.AzureEnvironment environment,
String... scopes)
Creates ArmChallengeAuthenticationPolicy.
|
Modifier and Type | Method and Description |
---|---|
Mono<Void> |
authorizeRequest(HttpPipelineCallContext context)
Executed before sending the initial request and authenticates the request.
|
Mono<Boolean> |
authorizeRequestOnChallenge(HttpPipelineCallContext context,
HttpResponse response)
Handles the authentication challenge in the event a 401 response with a WWW-Authenticate authentication
challenge header is received after the initial request and returns appropriate
TokenRequestContext to
be used for re-authentication. |
process, setAuthorizationHeader
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPipelinePosition
public ArmChallengeAuthenticationPolicy(TokenCredential credential, com.azure.core.experimental.implementation.AzureEnvironment environment, String... scopes)
credential
- the token credential to authenticate the requestenvironment
- the environment with endpoints for authenticationscopes
- the scopes used in credential, using default scopes when emptypublic Mono<Void> authorizeRequest(HttpPipelineCallContext context)
BearerTokenAuthenticationChallengePolicy
authorizeRequest
in class BearerTokenAuthenticationChallengePolicy
context
- The request context.Mono
containing Void
public Mono<Boolean> authorizeRequestOnChallenge(HttpPipelineCallContext context, HttpResponse response)
BearerTokenAuthenticationChallengePolicy
TokenRequestContext
to
be used for re-authentication.authorizeRequestOnChallenge
in class BearerTokenAuthenticationChallengePolicy
context
- The request context.response
- The Http Response containing the authentication challenge header.Mono
containing TokenRequestContext
Copyright © 2021 Microsoft Corporation. All rights reserved.