Interface ValidationFailedHandler

All Known Implementing Classes:
DefaultValidationFailedHandler

public interface ValidationFailedHandler
Handler for handling the case when the core signature validation fails or a XMLSignatureException occurs during calling XMLSignature.validate(javax.xml.crypto.dsig.XMLValidateContext). This handler can be used to react in a specific way on validation failures. For example, the handler could write logs or may even ignore certain validation failures.

Typically the handler throws an exception when a validation failure occurs. There is a certain order how the methods are called.

If you throw an exception then the validation checking is interrupted and after that only the end() method is called in a finally block. Best practice is to interrupt the validation at the first occurrence of a validation error.