An instance of this class can be created by AuthConfig and it must be registered to property bag in ClientManager.
Authenticator, ClientManager#getProperties()
| Modifier and Type | Class and Description |
|---|---|
| public static class | AuthConfig.
The AuthConfig.Builder is a class used for creating an instance of |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| pack-priv static final String | BASIC
Basic authentication scheme key. |
| pack-priv static final Charset | CHARACTER_SET
Encoding used for authentication calculations. |
| pack-priv static final String | DIGEST
Digest authentication scheme key. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static AuthConfig. | |
| public Map | Returns: unmodifiable map of authenticators. Case insensitive authentication scheme is mapped toAuthenticator.Get an unmodifiable map of authenticators, where case insensitive authentication scheme to |
| public String |
| authenticators | back to summary |
|---|---|
| private final Map<String, Authenticator> authenticators | |
| BASIC | back to summary |
|---|---|
| pack-priv static final String BASIC Basic authentication scheme key. | |
| CHARACTER_SET | back to summary |
|---|---|
| pack-priv static final Charset CHARACTER_SET Encoding used for authentication calculations. | |
| DIGEST | back to summary |
|---|---|
| pack-priv static final String DIGEST Digest authentication scheme key. | |
| AuthConfig | back to summary |
|---|---|
| private AuthConfig(Map<String, Authenticator> authenticators) | |
| builder | back to summary |
|---|---|
| public static AuthConfig. Create new
| |
| getAuthenticators | back to summary |
|---|---|
| public Map Get an unmodifiable map of authenticators, where case insensitive authentication scheme to
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
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();
Credentials, Authenticator
| Modifier and Type | Field and Description |
|---|---|
| private final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public AuthConfig | |
| public static AuthConfig. | Returns: AuthConfig. instance.Create new |
| public final AuthConfig. | Returns: updatedAuthConfig. instance.Disable provided Basic |
| public final AuthConfig. | Returns: updatedAuthConfig. instance.Disable provided Digest |
| public final AuthConfig. | Returns: updatedAuthConfig. instance.authentication scheme for which the registered authenticator will be used. Scheme is
compared case insensitive. scheme, final Authenticator Authenticator instance to be registered.Register |
| authenticators | back to summary |
|---|---|
| private final Map<String, Authenticator> authenticators | |
| Builder | back to summary |
|---|---|
| private Builder() | |
| build | back to summary |
|---|---|
| public AuthConfig build() Build an instance of
| |
| create | back to summary |
|---|---|
| public static AuthConfig. Create new
| |
| disableProvidedBasicAuth | back to summary |
|---|---|
| public final AuthConfig. Disable provided Basic
| |
| disableProvidedDigestAuth | back to summary |
|---|---|
| public final AuthConfig. Disable provided Digest
| |
| registerAuthProvider | back to summary |
|---|---|
| public final AuthConfig. Register
Only one
| |