Class SAMLSignatureProfileValidatorTest


  • public class SAMLSignatureProfileValidatorTest
    extends XMLObjectBaseTestCase
    Test the SAML XML Signature profile validator.
    • Constructor Detail

      • SAMLSignatureProfileValidatorTest

        public SAMLSignatureProfileValidatorTest()
    • Method Detail

      • testValid

        public void testValid()
      • testInvalidNoXMLSignature

        public void testInvalidNoXMLSignature()
      • testInvalidTooManyReferences

        public void testInvalidTooManyReferences()
      • testInvalidNonLocalURI

        public void testInvalidNonLocalURI()
      • testInvalidMissingID

        public void testInvalidMissingID()
      • testInvalidBadURIValue

        public void testInvalidBadURIValue()
      • testInvalidTooManyTransforms

        public void testInvalidTooManyTransforms()
      • testInvalidBadTransform

        public void testInvalidBadTransform()
      • testInvalidMissingEnvelopedTransform

        public void testInvalidMissingEnvelopedTransform()
      • testInvalidDuplicateIDs

        public void testInvalidDuplicateIDs()
      • getSignature

        protected Signature getSignature​(String filename)
        Get the signature to validated. Assume the document element of the file is a SignableSAMLObject.
        Parameters:
        filename - file containing a signed SignableSAMLObject as its document element.
        Returns:
        the signature from the indicated element
      • assertValidationPass

        protected void assertValidationPass​(String message,
                                            Signature validateTarget)
        Asserts that the validation of the specified Signature target was successful, as expected.
        Parameters:
        message - failure message if the validation does not pass
        validateTarget - the XMLObject to validate
      • assertValidationFail

        protected void assertValidationFail​(String message,
                                            Signature validateTarget)
        Asserts that the validation of the specified Signature target failed, as expected.
        Parameters:
        message - failure message if the validation does not fail
        validateTarget - XMLObject to validate