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 TypeMethodDescriptionvoidend()booleanIf true is returned then the verifier will go-on as if there was no validation failure.voidMethod called when an XMLSignatureException is thrown by the methodXMLSignature.validate(javax.xml.crypto.dsig.XMLValidateContext).voidvoidvoidstart()
-
Constructor Details
-
DefaultValidationFailedHandler
public DefaultValidationFailedHandler()
-
-
Method Details
-
onXMLSignatureException
Description copied from interface:ValidationFailedHandlerMethod 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:
onXMLSignatureExceptionin interfaceValidationFailedHandler- Parameters:
se- exception- Returns:
- exception exception which is then thrown by XmlSignerProcessor.
-
start
public void start()- Specified by:
startin interfaceValidationFailedHandler
-
signatureValueValidationFailed
- Specified by:
signatureValueValidationFailedin interfaceValidationFailedHandler- Throws:
Exception
-
referenceValidationFailed
- Specified by:
referenceValidationFailedin interfaceValidationFailedHandler- Throws:
Exception
-
manifestReferenceValidationFailed
- Specified by:
manifestReferenceValidationFailedin interfaceValidationFailedHandler- Throws:
Exception
-
end
- Specified by:
endin interfaceValidationFailedHandler- Throws:
Exception
-
ignoreCoreValidationFailure
Description copied from interface:ValidationFailedHandlerIf 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
falseto ensure that after a core validation failure, the verification fails.- Specified by:
ignoreCoreValidationFailurein interfaceValidationFailedHandler- Returns:
- true or false
- Throws:
Exception
-