Class SharedTokenCacheCredentialBuilder

All Implemented Interfaces:
com.azure.core.client.traits.HttpTrait<SharedTokenCacheCredentialBuilder>

@Deprecated public class SharedTokenCacheCredentialBuilder extends AadCredentialBuilderBase<SharedTokenCacheCredentialBuilder>
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.

See Also:
  • Constructor Details

    • SharedTokenCacheCredentialBuilder

      public SharedTokenCacheCredentialBuilder()
      Deprecated.
      Constructs an instance of SharedTokenCacheCredentialBuilder.
  • Method Details

    • username

      public SharedTokenCacheCredentialBuilder username(String username)
      Deprecated.
      Sets the username for the account.
      Parameters:
      username - The username for the account.
      Returns:
      The updated SharedTokenCacheCredentialBuilder object.
    • tokenCachePersistenceOptions

      public SharedTokenCacheCredentialBuilder tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
      Deprecated.
      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.
    • authenticationRecord

      public SharedTokenCacheCredentialBuilder authenticationRecord(AuthenticationRecord authenticationRecord)
      Deprecated.
      Sets the AuthenticationRecord captured from a previous authentication.
      Parameters:
      authenticationRecord - the authentication record to be configured.
      Returns:
      An updated instance of this builder with the configured authentication record.
    • build

      Deprecated.
      Creates a new SharedTokenCacheCredentialBuilder with the current configurations.
      Returns:
      a SharedTokenCacheCredentialBuilder with the current configurations.