Package com.azure.identity
Class ClientSecretCredentialBuilder
- java.lang.Object
-
- com.azure.identity.CredentialBuilderBase<T>
-
- com.azure.identity.AadCredentialBuilderBase<ClientSecretCredentialBuilder>
-
- com.azure.identity.ClientSecretCredentialBuilder
-
public class ClientSecretCredentialBuilder extends AadCredentialBuilderBase<ClientSecretCredentialBuilder>
Fluent credential builder for instantiating aClientSecretCredential.- See Also:
ClientSecretCredential
-
-
Constructor Summary
Constructors Constructor Description ClientSecretCredentialBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientSecretCredentialbuild()Creates a newClientCertificateCredentialwith the current configurations.ClientSecretCredentialBuilderclientSecret(String clientSecret)Sets the client secret for the authentication.ClientSecretCredentialBuildertokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)Configures the persistent shared token cache options and enables the persistent token cache which is disabled by default.-
Methods inherited from class com.azure.identity.AadCredentialBuilderBase
authorityHost, clientId, executorService, tenantId
-
Methods inherited from class com.azure.identity.CredentialBuilderBase
configuration, httpClient, httpPipeline, maxRetry, proxyOptions, retryTimeout
-
-
-
-
Method Detail
-
clientSecret
public ClientSecretCredentialBuilder clientSecret(String clientSecret)
Sets the client secret for the authentication.- Parameters:
clientSecret- the secret value of the AAD application.- Returns:
- An updated instance of this builder.
-
tokenCachePersistenceOptions
public ClientSecretCredentialBuilder tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
Configures the persistent shared token cache options and enables the persistent token cache which is disabled by default. If configured, the credential will store tokens in a cache persisted to the machine, protected to the current user, which can be shared by other credentials and processes.- Parameters:
tokenCachePersistenceOptions- the token cache configuration options- Returns:
- An updated instance of this builder with the token cache options configured.
-
build
public ClientSecretCredential build()
Creates a newClientCertificateCredentialwith the current configurations.- Returns:
- a
ClientSecretCredentialBuilderwith the current configurations.
-
-