Class VerificationSpec

java.lang.Object
net.visma.autopay.http.signature.VerificationSpec

public class VerificationSpec extends Object
Signature verification specification - all data needed to verify a signature.
  • Required signature parameters
  • Forbidden signature parameters
  • Required signature components
  • Signature context containing values for defined components. Copied from verified request or response.
  • Public key supplier
  • Signature label
  • Application-specific tag
  • Limits for signature creation time
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Builder class to build VerificationSpec objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a builder used to construct VerificationSpec object
    boolean
    Compares the specified object with this SignatureSpec for equality.
    int
    Returns hash code for this VerificationSpec, which is composed of hash codes of all but publicKeyGetter object fields
    String representation of this object.
    void
    Verifies signature according to this Verification Spec and throws an exception when signature is incorrect or any other problem occurs.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • verify

      public void verify() throws SignatureException
      Verifies signature according to this Verification Spec and throws an exception when signature is incorrect or any other problem occurs.
      Throws:
      SignatureException - Incorrect signature or problems with verification, e.g. missing or malformatted values in Signature Context, problems with the public key. For detailed reason call SignatureException.getErrorCode().
      See Also:
    • builder

      public static VerificationSpec.Builder builder()
      Returns a builder used to construct VerificationSpec object
      Returns:
      A VerificationSpec builder
    • toString

      public String toString()
      String representation of this object. It does not contain public key getter.
      Overrides:
      toString in class Object
      Returns:
      String representation of this VerificationSpec
    • equals

      public boolean equals(Object o)
      Compares the specified object with this SignatureSpec for equality. Returns true if the given object is of the same class as this VerificationSpec, and all but publicKeyGetter object fields are equal.
      Overrides:
      equals in class Object
      Parameters:
      o - Object to be compared with this VerificationSpec
      Returns:
      True is specified object is equal to this VerificationSpec
    • hashCode

      public int hashCode()
      Returns hash code for this VerificationSpec, which is composed of hash codes of all but publicKeyGetter object fields
      Overrides:
      hashCode in class Object
      Returns:
      The hash code for this VerificationSpec