Class ClientAssertionCredentialBuilder

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

    • ClientAssertionCredentialBuilder

      public ClientAssertionCredentialBuilder()
  • Method Details

    • clientAssertion

      public ClientAssertionCredentialBuilder clientAssertion(Supplier<String> clientAssertionSupplier)
      Sets the supplier containing the logic to supply the client assertion when invoked.
      clientAssertionSupplier - the supplier supplying client assertion.
      An updated instance of this builder.
    • tokenCachePersistenceOptions

      public ClientAssertionCredentialBuilder 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.
    • build

      public ClientAssertionCredential build()
      Creates a new ClientAssertionCredential with the current configurations.
      a ClientAssertionCredential with the current configurations.
      IllegalArgumentException - if either of clientId, tenantId or clientAssertion is not present.