public class AzureApplicationCredentialBuilder extends CredentialBuilderBase<AzureApplicationCredentialBuilder>
AzureApplicationCredential
.AzureApplicationCredential
Constructor and Description |
---|
AzureApplicationCredentialBuilder()
Creates an instance of a AzureApplicationCredentialBuilder.
|
Modifier and Type | Method and Description |
---|---|
AzureApplicationCredentialBuilder |
authorityHost(String authorityHost)
Specifies the Azure Active Directory endpoint to acquire tokens.
|
AzureApplicationCredential |
build()
Creates new
AzureApplicationCredential with the configured options set. |
AzureApplicationCredentialBuilder |
executorService(ExecutorService executorService)
Specifies the ExecutorService to be used to execute the authentication requests.
|
AzureApplicationCredentialBuilder |
managedIdentityClientId(String clientId)
Specifies the client ID of user assigned or system assigned identity, when this credential is running
in an environment with managed identities.
|
allowMultiTenantAuthentication, httpClient, httpPipeline, maxRetry, proxyOptions, retryTimeout
public AzureApplicationCredentialBuilder()
public AzureApplicationCredentialBuilder authorityHost(String authorityHost)
authorityHost
- the Azure Active Directory endpointpublic AzureApplicationCredentialBuilder managedIdentityClientId(String clientId)
clientId
- the client IDpublic AzureApplicationCredentialBuilder executorService(ExecutorService executorService)
If this is not configured, the ForkJoinPool.commonPool()
will be used which is
also shared with other application tasks. If the common pool is heavily used for other tasks, authentication
requests might starve and setting up this executor service should be considered.
The executor service and can be safely shutdown if the TokenCredential is no longer being used by the Azure SDK clients and should be shutdown before the application exits.
executorService
- the executor service to use for executing authentication requests.public AzureApplicationCredential build()
AzureApplicationCredential
with the configured options set.AzureApplicationCredential
with the current configurations.Copyright © 2021 Microsoft Corporation. All rights reserved.