Class DefaultValidationFailedHandler
java.lang.Object
org.apache.camel.component.xmlsecurity.api.DefaultValidationFailedHandler
- All Implemented Interfaces:
ValidationFailedHandler
Interrupts the validation by throwing an exception as soon as a validation failure occurs and gives specific error
messages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
end()
boolean
If true is returned then the verifier will go-on as if there was no validation failure.void
Method called when an XMLSignatureException is thrown by the methodXMLSignature.validate(javax.xml.crypto.dsig.XMLValidateContext)
.void
void
void
start()
-
Constructor Details
-
DefaultValidationFailedHandler
public DefaultValidationFailedHandler()
-
-
Method Details
-
onXMLSignatureException
Description copied from interface:ValidationFailedHandler
Method called when an XMLSignatureException is thrown by the methodXMLSignature.validate(javax.xml.crypto.dsig.XMLValidateContext)
.You can return more specific exceptions which are useful for your use-case.
- Specified by:
onXMLSignatureException
in interfaceValidationFailedHandler
- Parameters:
se
- exception- Returns:
- exception exception which is then thrown by XmlSignerProcessor.
-
start
public void start()- Specified by:
start
in interfaceValidationFailedHandler
-
signatureValueValidationFailed
- Specified by:
signatureValueValidationFailed
in interfaceValidationFailedHandler
- Throws:
Exception
-
referenceValidationFailed
- Specified by:
referenceValidationFailed
in interfaceValidationFailedHandler
- Throws:
Exception
-
manifestReferenceValidationFailed
- Specified by:
manifestReferenceValidationFailed
in interfaceValidationFailedHandler
- Throws:
Exception
-
end
- Specified by:
end
in interfaceValidationFailedHandler
- Throws:
Exception
-
ignoreCoreValidationFailure
Description copied from interface:ValidationFailedHandler
If true is returned then the verifier will go-on as if there was no validation failure. If false is returned than the verifier will throw anXmlSignatureInvalidException
.Best practice is to return
false
to ensure that after a core validation failure, the verification fails.- Specified by:
ignoreCoreValidationFailure
in interfaceValidationFailedHandler
- Returns:
- true or false
- Throws:
Exception
-