public class DefaultAzureCredentialBuilder extends CredentialBuilderBase<DefaultAzureCredentialBuilder>
DefaultAzureCredential
.DefaultAzureCredential
Constructor and Description |
---|
DefaultAzureCredentialBuilder()
Creates an instance of a DefaultAzureCredentialBuilder.
|
Modifier and Type | Method and Description |
---|---|
DefaultAzureCredentialBuilder |
authorityHost(String authorityHost)
Specifies the Azure Active Directory endpoint to acquire tokens.
|
DefaultAzureCredential |
build()
Creates new
DefaultAzureCredential with the configured options set. |
DefaultAzureCredentialBuilder |
executorService(ExecutorService executorService)
Specifies the ExecutorService to be used to execute the authentication requests.
|
DefaultAzureCredentialBuilder |
intelliJKeePassDatabasePath(String databasePath)
Specifies the KeePass database path to read the cached credentials of Azure toolkit for IntelliJ plugin.
|
DefaultAzureCredentialBuilder |
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.
|
DefaultAzureCredentialBuilder |
tenantId(String tenantId)
Sets the tenant id of the user to authenticate through the
DefaultAzureCredential . |
allowMultiTenantAuthentication, httpClient, httpPipeline, maxRetry, proxyOptions, retryTimeout
public DefaultAzureCredentialBuilder()
public DefaultAzureCredentialBuilder tenantId(String tenantId)
DefaultAzureCredential
. If unset, the value
in the AZURE_TENANT_ID environment variable will be used. If neither is set, the default is null
and will authenticate users to their default tenant.tenantId
- the tenant ID to set.public DefaultAzureCredentialBuilder authorityHost(String authorityHost)
authorityHost
- the Azure Active Directory endpointpublic DefaultAzureCredentialBuilder intelliJKeePassDatabasePath(String databasePath)
databasePath
is required on Windows platform. For macOS and Linux platform native key chain /
key ring will be accessed respectively to retrieve the cached credentials.
This path can be located in the IntelliJ IDE. Windows: File -> Settings -> Appearance & Behavior -> System Settings -> Passwords.
databasePath
- the path to the KeePass database.IllegalArgumentException
- if databasePath
is either not specified or is empty.public DefaultAzureCredentialBuilder managedIdentityClientId(String clientId)
clientId
- the client IDpublic DefaultAzureCredentialBuilder 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 DefaultAzureCredential build()
DefaultAzureCredential
with the configured options set.DefaultAzureCredential
with the current configurations.Copyright © 2021 Microsoft Corporation. All rights reserved.