Class DigestAuthenticator.NonceInfo
- java.lang.Object
-
- org.apache.catalina.authenticator.DigestAuthenticator.NonceInfo
-
- Enclosing class:
- DigestAuthenticator
public static class DigestAuthenticator.NonceInfo extends java.lang.ObjectTracks information about a server nonce, including timestamp and seen nonce counts.
-
-
Constructor Summary
Constructors Constructor Description NonceInfo(long currentTime, int seenWindowSize)Create a new NonceInfo instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetTimestamp()Get the timestamp when this nonce was created.booleannonceCountValid(long nonceCount)Validate the nonce count to detect replay attacks.
-
-
-
Method Detail
-
nonceCountValid
public boolean nonceCountValid(long nonceCount)
Validate the nonce count to detect replay attacks.- Parameters:
nonceCount- Nonce count from the client- Returns:
trueif the nonce count is valid
-
getTimestamp
public long getTimestamp()
Get the timestamp when this nonce was created.- Returns:
- Timestamp in milliseconds
-
-