Class AuthConfig.Builder

  • Enclosing class:
    AuthConfig

    public static final class AuthConfig.Builder
    extends java.lang.Object
    The AuthConfig.Builder is a class used for creating an instance of AuthConfig for purpose of HTTP Authentication.

    Example 1 - building an authentication configuration enhanced with user defined NTLM authentication and overridden Basic Authentication:

    
     AuthConfig authConfig = AuthConfig.Builder.create().
                              registerAuthProvider("NTLM", myAuthenticator).
                              registerAuthProvider("Basic", myBasicAuthenticator).
                              build();
     
    Example 2 - Building an authentication configuration with disabled Basic scheme authenticator:
    
     AuthConfig authConfig = AuthConfig.Builder.create().
                              disableProvidedBasicAuth().
                              build();
     
    See Also:
    Credentials, Authenticator