Package net.visma.autopay.http.signature
Class VerificationSpec
java.lang.Object
net.visma.autopay.http.signature.VerificationSpec
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
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VerificationSpec.Builder
builder()
Returns a builder used to constructVerificationSpec
objectboolean
Compares the specified object with this SignatureSpec for equality.int
hashCode()
Returns hash code for this VerificationSpec, which is composed of hash codes of all butpublicKeyGetter
object fieldstoString()
String representation of this object.void
verify()
Verifies signature according to this Verification Spec and throws an exception when signature is incorrect or any other problem occurs.
-
Method Details
-
verify
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 callSignatureException.getErrorCode()
.- See Also:
-
builder
Returns a builder used to constructVerificationSpec
object- Returns:
- A VerificationSpec builder
-
toString
String representation of this object. It does not contain public key getter. -
equals
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 butpublicKeyGetter
object fields are equal. -
hashCode
public int hashCode()Returns hash code for this VerificationSpec, which is composed of hash codes of all butpublicKeyGetter
object fields
-