Class DigestAuthenticator.NonceInfo
java.lang.Object
org.apache.catalina.authenticator.DigestAuthenticator.NonceInfo
- Enclosing class:
DigestAuthenticator
Tracks information about a server nonce, including timestamp and seen nonce counts.
-
Constructor Summary
ConstructorsConstructorDescriptionNonceInfo(long currentTime, int seenWindowSize) Create a new NonceInfo instance. -
Method Summary
Modifier and TypeMethodDescriptionlongGet the timestamp when this nonce was created.booleannonceCountValid(long nonceCount) Validate the nonce count to detect replay attacks.
-
Constructor Details
-
NonceInfo
public NonceInfo(long currentTime, int seenWindowSize) Create a new NonceInfo instance.- Parameters:
currentTime- Current timestampseenWindowSize- Size of the window for tracking seen nonce counts
-
-
Method Details
-
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
-