Module com.webauthn4j.core
Package com.webauthn4j.verifier
Interface CoreMaliciousCounterValueHandler
public interface CoreMaliciousCounterValueHandler
strategy interface to handle malicious counter value detection during authentication.
This interface is similar to MaliciousCounterValueHandler but works with
CoreAuthenticationObject instead of AuthenticationObject
Implementations of this interface define strategies for handling suspicious counter values, whether to throw an exception, log a warning, or take other mitigating actions.
-
Method Summary
Modifier and TypeMethodDescriptionvoidmaliciousCounterValueDetected(@NotNull CoreAuthenticationObject authenticationObject) Handles a detected malicious counter value during authentication.
-
Method Details
-
maliciousCounterValueDetected
Handles a detected malicious counter value during authentication.This method is called when the authenticator's counter value is less than or equal to the previously registered counter value, which may indicate a cloned authenticator or replay attack.
- Parameters:
authenticationObject- the core authentication object containing the detected malicious counter value- Throws:
MaliciousCounterValueException- if the implementation chooses to throw an exception
-