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, setAuthorizationHeaderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPipelinePositionpublic 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)
BearerTokenAuthenticationChallengePolicyauthorizeRequest in class BearerTokenAuthenticationChallengePolicycontext - The request context.Mono containing Voidpublic Mono<Boolean> authorizeRequestOnChallenge(HttpPipelineCallContext context, HttpResponse response)
BearerTokenAuthenticationChallengePolicyTokenRequestContext to
be used for re-authentication.authorizeRequestOnChallenge in class BearerTokenAuthenticationChallengePolicycontext - The request context.response - The Http Response containing the authentication challenge header.Mono containing TokenRequestContextCopyright © 2021 Microsoft Corporation. All rights reserved.