public class InteractiveBrowserCredentialBuilder extends AadCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
InteractiveBrowserCredential.InteractiveBrowserCredential| Constructor and Description |
|---|
InteractiveBrowserCredentialBuilder() |
| Modifier and Type | Method and Description |
|---|---|
InteractiveBrowserCredentialBuilder |
authenticationRecord(AuthenticationRecord authenticationRecord)
Sets the
AuthenticationRecord captured from a previous authentication. |
InteractiveBrowserCredential |
build()
Creates a new
InteractiveBrowserCredential with the current configurations. |
InteractiveBrowserCredentialBuilder |
disableAutomaticAuthentication()
Disables the automatic authentication and prevents the
InteractiveBrowserCredential from automatically
prompting the user. |
InteractiveBrowserCredentialBuilder |
port(int port)
Deprecated.
Configure the redirect URL as
http://localhost:{port} via
InteractiveBrowserCredentialBuilder.redirectUrl(String) instead. |
InteractiveBrowserCredentialBuilder |
redirectUrl(String redirectUrl)
Sets the Redirect URL where STS will callback the application with the security code.
|
InteractiveBrowserCredentialBuilder |
tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
Configures the persistent shared token cache options and enables the persistent token cache which is disabled
by default.
|
authorityHost, clientId, executorService, tenantIdhttpClient, httpPipeline, maxRetry, proxyOptions, retryTimeout@Deprecated public InteractiveBrowserCredentialBuilder port(int port)
http://localhost:{port} via
InteractiveBrowserCredentialBuilder.redirectUrl(String) instead.http://localhost:{port} must be
registered as a valid reply URL on the application.port - the port on which the credential will listen for the browser authentication resultpublic InteractiveBrowserCredentialBuilder authenticationRecord(AuthenticationRecord authenticationRecord)
AuthenticationRecord captured from a previous authentication.authenticationRecord - The Authentication record to be configured.public InteractiveBrowserCredentialBuilder tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
tokenCachePersistenceOptions - the token cache configuration optionspublic InteractiveBrowserCredentialBuilder redirectUrl(String redirectUrl)
AadCredentialBuilderBase.clientId(String) and must match the
redirect URL specified during the application registration.redirectUrl - the redirect URL to listen on and receive security code.public InteractiveBrowserCredentialBuilder disableAutomaticAuthentication()
InteractiveBrowserCredential from automatically
prompting the user. If automatic authentication is disabled a AuthenticationRequiredException
will be thrown from InteractiveBrowserCredential.getToken(TokenRequestContext) in the case that
user interaction is necessary. The application is responsible for handling this exception, and
calling InteractiveBrowserCredential.authenticate() or
InteractiveBrowserCredential.authenticate(TokenRequestContext) to authenticate the user interactively.public InteractiveBrowserCredential build()
InteractiveBrowserCredential with the current configurations.InteractiveBrowserCredential with the current configurations.Copyright © 2021 Microsoft Corporation. All rights reserved.