Since the digest username is included as clear text in the generated Authentication header, the charset of the username must be compatible with the HTTP element charset used by the connection.
| Modifier and Type | Class and Description |
|---|---|
| private static enum | DigestScheme.QualityOfProtection
Represent the possible values of quality of protection. |
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private byte[] | |
| private transient ByteArrayBuilder | |
| private String | |
| private boolean | |
| private UsernamePasswordCredentials | |
| private transient Charset | |
| private static final char[] | HEXADECIMAL
Hexa values used when creating 32 character long digest in HTTP DigestScheme in case of authentication. |
| private String | |
| private static final Logger | |
| private long | |
| private final Map | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static byte[] | Returns: The cnonce value as String.Creates a random cnonce value based on the current time. |
| private String | |
| private static MessageDigest | |
| pack-priv static String | Returns: encoded MD5, ornull if encoding failedarray containing the digest binaryData)Encodes the 128 bit (16 bytes) MD5 digest into a 32 characters long string. |
| public String | generateAuthResponse(final HttpHost host, final HttpRequest
The request being authenticated request, final HttpContext HTTP context context)Implements org. |
| pack-priv String | |
| pack-priv String | |
| public String | |
| public String | getName()
Implements org. |
| public String | |
| public long | |
| public Principal | getPrincipal()
Implements org. Principal whose credentials are used to generate
an authentication response.
|
| public String | getRealm()
Implements org. |
| public void | |
| public boolean | isChallengeComplete()
Implements org. |
| public boolean | isConnectionBased()
Implements org. |
| public boolean | isResponseReady(final HttpHost host, final CredentialsProvider
The credentials to be used for authentication credentialsProvider, final HttpContext HTTP context context)Implements org. |
| public void | processChallenge(final AuthChallenge
the auth challenge authChallenge, final HttpContext HTTP context context)Implements org. |
| private void | |
| public String | |
| private void |
| a1 | back to summary |
|---|---|
| private byte[] a1 | |
| a2 | back to summary |
|---|---|
| private byte[] a2 | |
| buffer | back to summary |
|---|---|
| private transient ByteArrayBuilder buffer | |
| cnonce | back to summary |
|---|---|
| private String cnonce | |
| complete | back to summary |
|---|---|
| private boolean complete | |
| credentials | back to summary |
|---|---|
| private UsernamePasswordCredentials credentials | |
| defaultCharset | back to summary |
|---|---|
| private transient Charset defaultCharset | |
| HEXADECIMAL | back to summary |
|---|---|
| private static final char[] HEXADECIMAL Hexa values used when creating 32 character long digest in HTTP DigestScheme in case of authentication.
| |
| lastNonce | back to summary |
|---|---|
| private String lastNonce | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| nounceCount | back to summary |
|---|---|
| private long nounceCount | |
| paramMap | back to summary |
|---|---|
| private final Map<String, String> paramMap | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| DigestScheme | back to summary |
|---|---|
| public DigestScheme() | |
| DigestScheme | back to summary |
|---|---|
| public DigestScheme(final Charset charset) | |
| createCnonce | back to summary |
|---|---|
| pack-priv static byte[] createCnonce() Creates a random cnonce value based on the current time.
| |
| createDigestResponse | back to summary |
|---|---|
| private String createDigestResponse(final HttpRequest request) throws AuthenticationException | |
| createMessageDigest | back to summary |
|---|---|
| private static MessageDigest createMessageDigest(final String digAlg) throws UnsupportedDigestAlgorithmException | |
| formatHex | back to summary |
|---|---|
| pack-priv static String formatHex(final byte[] binaryData) Encodes the 128 bit (16 bytes) MD5 digest into a 32 characters long string.
| |
| generateAuthResponse | back to summary |
|---|---|
| public String generateAuthResponse(final HttpHost host, final HttpRequest request, final HttpContext context) throws AuthenticationException Implements org. Doc from org. Generates an authorization response based on the current state. Some authentication
schemes may need to load user credentials required to generate an authorization
response from a
| |
| getA1 | back to summary |
|---|---|
| pack-priv String getA1() | |
| getA2 | back to summary |
|---|---|
| pack-priv String getA2() | |
| getCnonce | back to summary |
|---|---|
public String getCnonce()
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. Returns textual designation of the given authentication scheme. | |
| getNonce | back to summary |
|---|---|
public String getNonce()
| |
| getNounceCount | back to summary |
|---|---|
public long getNounceCount()
| |
| getPrincipal | back to summary |
|---|---|
| public Principal getPrincipal() Implements org. Doc from org. Returns | |
| getRealm | back to summary |
|---|---|
| public String getRealm() Implements org. Doc from org. Returns authentication realm. If the concept of an authentication
realm is not applicable to the given authentication scheme, returns
| |
| initPreemptive | back to summary |
|---|---|
| public void initPreemptive(final Credentials credentials, final String cnonce, final String realm) | |
| isChallengeComplete | back to summary |
|---|---|
| public boolean isChallengeComplete() Implements org. Doc from org. Authentication process may involve a series of challenge-response exchanges. This method tests if the authorization process has been fully completed (either successfully or unsuccessfully), that is, all the required authorization challenges have been processed in their entirety.
| |
| isConnectionBased | back to summary |
|---|---|
| public boolean isConnectionBased() Implements org. Doc from org. Determines if the authentication scheme is expected to provide an authorization response on a per connection basis instead of the standard per request basis
| |
| isResponseReady | back to summary |
|---|---|
| public boolean isResponseReady(final HttpHost host, final CredentialsProvider credentialsProvider, final HttpContext context) throws AuthenticationException Implements org. Doc from org. Determines whether or not an authorization response can be generated based on the actual authentication state. Generally the outcome of this method will depend upon availability of user credentials necessary to produce an authorization response.
| |
| processChallenge | back to summary |
|---|---|
| public void processChallenge(final AuthChallenge authChallenge, final HttpContext context) throws MalformedChallengeException Implements org. Doc from org. Processes the given auth challenge. Some authentication schemes may involve multiple challenge-response exchanges. Such schemes must be able to maintain internal state when dealing with sequential challenges
| |
| readObject | back to summary |
|---|---|
| private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| writeObject | back to summary |
|---|---|
| private void writeObject(final ObjectOutputStream out) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| public static final DigestScheme. | |
| public static final DigestScheme. | |
| public static final DigestScheme. | |
| public static final DigestScheme. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DigestScheme. | |
| public static DigestScheme. |
| AUTH | back to summary |
|---|---|
| public static final DigestScheme. | |
| AUTH_INT | back to summary |
|---|---|
| public static final DigestScheme. | |
| MISSING | back to summary |
|---|---|
| public static final DigestScheme. | |
| UNKNOWN | back to summary |
|---|---|
| public static final DigestScheme. | |
| QualityOfProtection | back to summary |
|---|---|
| private QualityOfProtection() | |
| valueOf | back to summary |
|---|---|
| public static DigestScheme. | |
| values | back to summary |
|---|---|
| public static DigestScheme. | |