SharedTokenCacheCredentialBuilder Class
- java.
lang. Object - com.
azure. identity. CredentialBuilderBase<T> - com.
azure. identity. AadCredentialBuilderBase<T> - com.
azure. identity. SharedTokenCacheCredentialBuilder
- com.
- com.
- com.
@Deprecated
public class SharedTokenCacheCredentialBuilder
extends AadCredentialBuilderBase<SharedTokenCacheCredentialBuilder>
Note
This class has been deprecated. This credential was originally created to support authentication with Visual Studio. Since Visual Studio was the only application that wrote to this token cache, this credential has been deprecated in favor of other developer credentials like AzureCliCredential, AzureDeveloperCliCredential, AzurePowerShellCredential, or IntelliJCredential for local development scenarios.
Fluent credential builder for instantiating a SharedTokenCacheCredential.
This credential is a legacy mechanism for authenticating clients using credentials provided to Visual Studio.
Constructor Summary
Constructor | Description |
---|---|
SharedTokenCacheCredentialBuilder() |
Constructs an instance of Shared |
Method Summary
Modifier and Type | Method and Description |
---|---|
Shared |
authenticationRecord(AuthenticationRecord authenticationRecord)
Sets the AuthenticationRecord captured from a previous authentication. |
Shared |
build()
Creates a new SharedTokenCacheCredentialBuilder with the current configurations. |
Shared |
tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
Configures the persistent shared token cache options and enables the persistent token cache which is disabled by default. |
Shared |
username(String username)
Sets the username for the account. |
Methods inherited from AadCredentialBuilderBase
Methods inherited from CredentialBuilderBase
Methods inherited from java.lang.Object
Constructor Details
SharedTokenCacheCredentialBuilder
public SharedTokenCacheCredentialBuilder()
Constructs an instance of SharedTokenCacheCredentialBuilder.
Method Details
authenticationRecord
public SharedTokenCacheCredentialBuilder authenticationRecord(AuthenticationRecord authenticationRecord)
Sets the AuthenticationRecord captured from a previous authentication.
Parameters:
Returns:
build
public SharedTokenCacheCredential build()
Creates a new SharedTokenCacheCredentialBuilder with the current configurations.
Returns:
tokenCachePersistenceOptions
public SharedTokenCacheCredentialBuilder 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:
Returns:
username
public SharedTokenCacheCredentialBuilder username(String username)
Sets the username for the account.
Parameters:
Returns: