Class SignatureValidator

java.lang.Object
org.opensaml.xmlsec.signature.support.SignatureValidator

public final class SignatureValidator
extends Object
A service class that cryptographically validates an XML Signature Signature using a candidate validation Credential.
  • Field Details

    • validatorInstance

      private static SignatureValidationProvider validatorInstance
      The cached signature validation provider instance to use.
  • Constructor Details

    • SignatureValidator

      protected SignatureValidator()
      Constructor.
  • Method Details

    • validate

      public static void validate​(@Nonnull Signature signature, @Nonnull Credential validationCredential) throws SignatureException
      Validate the given XML Signature using the given candidate validation Credential.
      Parameters:
      signature - the XMLSignature to validate
      validationCredential - the candidate validation Credential
      Throws:
      SignatureException - if the signature does not validate using the candiate Credential, or if there is otherwise an error during the validation operation
    • getSignatureValidationProvider

      @Nonnull private static SignatureValidationProvider getSignatureValidationProvider() throws SignatureException
      Obtain the SignatureValidationProvider instance to be used.
      Returns:
      the SignatureValidationProvider
      Throws:
      SignatureException - if a SignatureValidationProvider could not be loaded
    • getLogger

      @Nonnull private static org.slf4j.Logger getLogger()
      Get an SLF4J Logger.
      Returns:
      a Logger instance