Authorization header of HTTP request for Digest Http Authentication scheme (RFC 2617).
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum | |
| pack-priv class | DigestAuthenticator.
Digest scheme POJO |
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final char[] | |
| private static final Pattern | |
| private static final Logger | |
| private SecureRandom |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private static void | append(StringBuilder
string builder instance sb, String key string key, String value string value, boolean true if value needs to be enclosed in quotes useQuote)Append comma separated key=value token |
| private static void | append(StringBuilder
string builder instance sb, String key string key, String value string value)Append comma separated key=value token. |
| private static String | |
| private String | Returns: digest authentication token stringDigestScheme instance ds,client request uri uri, final Credentials credentials)Creates digest string including counter. |
| public String | generateAuthorizationHeader(final URI
Uri of the server endpoint. uri, final String "WWW-Authenticate" header value received in a handshake
response. wwwAuthenticateHeader, final Credentials credentials passed by property credentials)ClientProperties#CREDENTIALS. Can be null when there were no Credentials registered.Implements abstract org. Generate value used as "Authorization" header value for next request. |
| private static String | |
| private DigestAuthenticator. | Returns: DigestScheme ornull if no digest header exists.value of authHeader)WWW-Authenticate headerParse digest header. |
| private String | Returns: hex stringnumber of bytes to generate nbBytes)Generate a random sequence of bytes and return its hex representation |
| CLIENT_NONCE_BYTE_COUNT | back to summary |
|---|---|
| private static final int CLIENT_NONCE_BYTE_COUNT | |
| HEX_ARRAY | back to summary |
|---|---|
| private static final char[] HEX_ARRAY | |
| KEY_VALUE_PAIR_PATTERN | back to summary |
|---|---|
| private static final Pattern KEY_VALUE_PAIR_PATTERN | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| randomGenerator | back to summary |
|---|---|
| private SecureRandom randomGenerator | |
| DigestAuthenticator | back to summary |
|---|---|
| pack-priv DigestAuthenticator() | |
| append | back to summary |
|---|---|
| private static void append(StringBuilder sb, String key, String value, boolean useQuote) Append comma separated key=value token
| |
| append | back to summary |
|---|---|
| private static void append(StringBuilder sb, String key, String value) Append comma separated key=value token. The value gets enclosed in quotes.
| |
| bytesToHex | back to summary |
|---|---|
| private static String bytesToHex(byte[] bytes) Convert bytes array to hex string.
| |
| createNextAuthToken | back to summary |
|---|---|
| private String createNextAuthToken(final DigestAuthenticator. Creates digest string including counter.
| |
| generateAuthorizationHeader | back to summary |
|---|---|
| public String generateAuthorizationHeader(final URI uri, final String wwwAuthenticateHeader, final Credentials credentials) throws AuthenticationException Implements abstract org. Doc from org. Generate value used as "Authorization" header value for next request.
Thrown
| |
| md5 | back to summary |
|---|---|
| private static String md5(String... tokens) throws AuthenticationException Colon separated value MD5 hash.
| |
| parseAuthHeaders | back to summary |
|---|---|
| private DigestAuthenticator. Parse digest header.
| |
| randomBytes | back to summary |
|---|---|
| private String randomBytes(int nbBytes) Generate a random sequence of bytes and return its hex representation
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| public static final DigestAuthenticator. | |
| public static final DigestAuthenticator. | |
| public static final DigestAuthenticator. |
| Modifier and Type | Method and Description |
|---|---|
| public static DigestAuthenticator. | |
| public String | toString()
Overrides java. Returns the name of this enum constant, as contained in the declaration. |
| public static DigestAuthenticator. | |
| public static DigestAuthenticator. |
| md | back to summary |
|---|---|
| private final String md | |
| MD5 | back to summary |
|---|---|
| public static final DigestAuthenticator. | |
| MD5_SESS | back to summary |
|---|---|
| public static final DigestAuthenticator. | |
| UNSPECIFIED | back to summary |
|---|---|
| public static final DigestAuthenticator. | |
| Algorithm | back to summary |
|---|---|
| private Algorithm(String md) | |
| parse | back to summary |
|---|---|
| public static DigestAuthenticator. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists. | |
| valueOf | back to summary |
|---|---|
| public static DigestAuthenticator. | |
| values | back to summary |
|---|---|
| public static DigestAuthenticator. | |
| Modifier and Type | Field and Description |
|---|---|
| private final DigestAuthenticator. | |
| private volatile int | |
| private final String | |
| private final String | |
| private final DigestAuthenticator. | |
| private final String | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | DigestScheme(String realm, String nonce, String opaque, DigestAuthenticator.
|
| Modifier and Type | Method and Description |
|---|---|
| public DigestAuthenticator. | |
| public int | |
| public String | |
| public String | |
| public DigestAuthenticator. | |
| public String | |
| public int | |
| public boolean |
| algorithm | back to summary |
|---|---|
| private final DigestAuthenticator. | |
| nc | back to summary |
|---|---|
| private volatile int nc | |
| nonce | back to summary |
|---|---|
| private final String nonce | |
| opaque | back to summary |
|---|---|
| private final String opaque | |
| qop | back to summary |
|---|---|
| private final DigestAuthenticator. | |
| realm | back to summary |
|---|---|
| private final String realm | |
| stale | back to summary |
|---|---|
| private final boolean stale | |
| DigestScheme | back to summary |
|---|---|
| pack-priv DigestScheme(String realm, String nonce, String opaque, DigestAuthenticator. | |
| getAlgorithm | back to summary |
|---|---|
| public DigestAuthenticator. | |
| getNc | back to summary |
|---|---|
| public int getNc() | |
| getNonce | back to summary |
|---|---|
| public String getNonce() | |
| getOpaque | back to summary |
|---|---|
| public String getOpaque() | |
| getQop | back to summary |
|---|---|
| public DigestAuthenticator. | |
| getRealm | back to summary |
|---|---|
| public String getRealm() | |
| incrementCounter | back to summary |
|---|---|
| public int incrementCounter() | |
| isStale | back to summary |
|---|---|
| public boolean isStale() | |
| Modifier and Type | Field and Description |
|---|---|
| public static final DigestAuthenticator. | |
| private final String | |
| public static final DigestAuthenticator. |
| Modifier and Type | Method and Description |
|---|---|
| public static DigestAuthenticator. | |
| public String | toString()
Overrides java. Returns the name of this enum constant, as contained in the declaration. |
| public static DigestAuthenticator. | |
| public static DigestAuthenticator. |
| AUTH | back to summary |
|---|---|
| public static final DigestAuthenticator. | |
| qop | back to summary |
|---|---|
| private final String qop | |
| UNSPECIFIED | back to summary |
|---|---|
| public static final DigestAuthenticator. | |
| QOP | back to summary |
|---|---|
| private QOP(String qop) | |
| parse | back to summary |
|---|---|
| public static DigestAuthenticator. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists. | |
| valueOf | back to summary |
|---|---|
| public static DigestAuthenticator. | |
| values | back to summary |
|---|---|
| public static DigestAuthenticator. | |