Class SharedTokenCacheCredentialBuilder

public class SharedTokenCacheCredentialBuilder extends AadCredentialBuilderBase<SharedTokenCacheCredentialBuilder>
Fluent credential builder for instantiating a SharedTokenCacheCredential.
See Also:
  • Constructor Details

    • SharedTokenCacheCredentialBuilder

      public SharedTokenCacheCredentialBuilder()
  • Method Details

    • username

      public SharedTokenCacheCredentialBuilder username(String username)
      Sets the username for the account.
      username - The username for the account.
      The updated SharedTokenCacheCredentialBuilder object.
    • 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.
      tokenCachePersistenceOptions - the token cache configuration options
      An updated instance of this builder with the token cache options configured.
    • authenticationRecord

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

      Creates a new SharedTokenCacheCredentialBuilder with the current configurations.
      a SharedTokenCacheCredentialBuilder with the current configurations.