Enum Class SignatureException.ErrorCode

java.lang.Object
java.lang.Enum<SignatureException.ErrorCode>
net.visma.autopay.http.signature.SignatureException.ErrorCode
All Implemented Interfaces:
Serializable, Comparable<SignatureException.ErrorCode>, Constable
Enclosing class:
SignatureException

public static enum SignatureException.ErrorCode extends Enum<SignatureException.ErrorCode>
Error codes to classify Signature Exceptions
  • Enum Constant Details

    • INCORRECT_SIGNATURE

      public static final SignatureException.ErrorCode INCORRECT_SIGNATURE
      When verifying, provided signature does not match computed Signature Base and provided public key. It's syntactically correct but the value itself is not correct. Exceptions' message contains used algorithm and computed Signature Base.
    • SIGNATURE_EXPIRED

      public static final SignatureException.ErrorCode SIGNATURE_EXPIRED
      Verified signature has expired.
      • Value of expires parameter is in the past
      • Or the signature is older than maximumAge requested in VerificationSpec, computed by using created parameter
      • Or the signature is from the "future": created parameter exceeds maximumSkew requested in VerificationSpec
    • UNKNOWN_ALGORITHM

      public static final SignatureException.ErrorCode UNKNOWN_ALGORITHM
      Algorithm of signature, private key or public key is not available in JVM.

      Indicates problems with used Security Provider

    • MISSING_ALGORITHM

      public static final SignatureException.ErrorCode MISSING_ALGORITHM
      Unable to determine signature algorithm when verifying.

      Algorithm must be provided either in PublicKeyInfo object or alg parameter

    • INVALID_KEY

      public static final SignatureException.ErrorCode INVALID_KEY
      Invalid public or public key provided.

      E.g. key algorithm not matching signature algorithm, problems with string-encoded keys

    • MISSING_HEADER

      public static final SignatureException.ErrorCode MISSING_HEADER
      Header value for a Header Component is missing when signing or verifying, or Signature or Signature-Input is missing when verifying
    • INVALID_STRUCTURED_HEADER

      public static final SignatureException.ErrorCode INVALID_STRUCTURED_HEADER
      Invalid syntax for used Structured Headers, e.g. Signature-Input
    • MISSING_DICTIONARY_KEY

      public static final SignatureException.ErrorCode MISSING_DICTIONARY_KEY
      Missing key for Structured Dictionary header, e.g. missing requested signature label in Signature or Signature-Input
    • MISSING_QUERY_PARAM

      public static final SignatureException.ErrorCode MISSING_QUERY_PARAM
      Target URI is missing a query or query parameter for @query-param Derived Component
    • MISSING_REQUIRED

      public static final SignatureException.ErrorCode MISSING_REQUIRED
      Required Component or Parameter defined in VerificationSpec is missing
    • MISSING_COMPONENT

      public static final SignatureException.ErrorCode MISSING_COMPONENT
      A Derived Component cannot be obtained from provided target URI
    • FORBIDDEN_PRESENT

      public static final SignatureException.ErrorCode FORBIDDEN_PRESENT
      Parameter defined as forbidden in VerificationSpec is present in Signature-Input when verifying
    • MISSING_TAG

      public static final SignatureException.ErrorCode MISSING_TAG
      Signature with requested tag not found when verifying
    • DUPLICATE_TAG

      public static final SignatureException.ErrorCode DUPLICATE_TAG
      Found multiple signatures with requested tag when verifying
    • GENERIC

      public static final SignatureException.ErrorCode GENERIC
      Generic security problem. Relates to GeneralSecurityException.
  • Method Details

    • values

      public static SignatureException.ErrorCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SignatureException.ErrorCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null