Class DigestAuthenticator.NonceInfo

java.lang.Object
org.apache.catalina.authenticator.DigestAuthenticator.NonceInfo
Enclosing class:
DigestAuthenticator

public static class DigestAuthenticator.NonceInfo extends Object
Tracks information about a server nonce, including timestamp and seen nonce counts.
  • Constructor Details

    • NonceInfo

      public NonceInfo(long currentTime, int seenWindowSize)
      Create a new NonceInfo instance.
      Parameters:
      currentTime - Current timestamp
      seenWindowSize - 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:
      true if the nonce count is valid
    • getTimestamp

      public long getTimestamp()
      Get the timestamp when this nonce was created.
      Returns:
      Timestamp in milliseconds