Class DefaultCredentialsProviderBuilder

java.lang.Object
interlok.http.apache.credentials.DefaultCredentialsProviderBuilder
All Implemented Interfaces:
CredentialsProviderBuilder

@ComponentProfile(since="4.5.0", summary="Supports use of \'org.apache.http.client.CredentialsProvider\'") public class DefaultCredentialsProviderBuilder extends Object implements CredentialsProviderBuilder
Supports the use of a org.apache.http.client.CredentialsProvider where supported in a configuration friendly way.

This uses org.apache.http.impl.client.SystemDefaultCredentialsProvider with added configuration from the underlying ScopedCredential via the CredentialsProvider#setCredentials(AuthScope, Credentials) method.

In the adapter configuration file this class is aliased as apache-http-default-credentials-provider-builder which is the preferred alternative to the fully qualified classname when building your configuration.

  • Constructor Details

    • DefaultCredentialsProviderBuilder

      public DefaultCredentialsProviderBuilder()
  • Method Details

    • withScopedCredentials

      public DefaultCredentialsProviderBuilder withScopedCredentials(ScopedCredential... w)
    • build

      public org.apache.http.client.CredentialsProvider build()
      Description copied from interface: CredentialsProviderBuilder
      Build the org.apache.http.client.CredentialsProvider instance.
      Specified by:
      build in interface CredentialsProviderBuilder
    • getScopedCredentials

      @NonNull @NotNull(message="No Credentials associated with a CredentialsProvider") public @NonNull @NotNull(message="No Credentials associated with a CredentialsProvider") List<ScopedCredential> getScopedCredentials()
    • setScopedCredentials

      public void setScopedCredentials(@NonNull @NotNull(message="No Credentials associated with a CredentialsProvider") @NonNull @NotNull(message="No Credentials associated with a CredentialsProvider") List<ScopedCredential> scopedCredentials)