Class DigestAuthenticator.DigestInfo
java.lang.Object
org.apache.catalina.authenticator.DigestAuthenticator.DigestInfo
- Enclosing class:
DigestAuthenticator
Holds the parsed and validated information from a Digest authentication request.
-
Constructor Summary
ConstructorsConstructorDescriptionDigestInfo(String opaque, long nonceValidity, String key, Map<String, DigestAuthenticator.NonceInfo> nonces, boolean validateUri) Create a new DigestInfo instance. -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(Realm realm) Authenticate the user against the given realm using the parsed digest credentials.Get the authenticated user name.booleanCheck if the nonce has expired and is considered stale.booleanParse the authorization header to extract digest credentials.booleanvalidate(Request request, List<DigestAuthenticator.AuthDigest> algorithms) Validate the parsed digest credentials against the request and configured algorithms.
-
Constructor Details
-
DigestInfo
public DigestInfo(String opaque, long nonceValidity, String key, Map<String, DigestAuthenticator.NonceInfo> nonces, boolean validateUri) Create a new DigestInfo instance.- Parameters:
opaque- Opaque stringnonceValidity- Nonce validity in millisecondskey- Private keynonces- Map of tracked noncesvalidateUri- Whether to validate the URI
-
-
Method Details
-
getUsername
-
parse
-
validate
Validate the parsed digest credentials against the request and configured algorithms.- Parameters:
request- HTTP requestalgorithms- Configured authentication algorithms- Returns:
trueif validation succeeded
-
isNonceStale
public boolean isNonceStale()Check if the nonce has expired and is considered stale.- Returns:
trueif the nonce is stale
-
authenticate
-