Package net.visma.autopay.http.signature
Class SignatureSpec
java.lang.Object
net.visma.autopay.http.signature.SignatureSpec
Signature specification - all data needed to create a signature.
- Signature parameters
- Signature component definitions
- Signature context containing values for defined components. Copied from signed request or response.
- Private key
- Signature label
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SignatureSpec.Builder
builder()
Returns a builder used to constructSignatureSpec
objectboolean
Compares the specified object with this SignatureSpec for equality.int
hashCode()
Returns hash code for this SignatureSpec, which is composed of hash codes of all object fieldssign()
Computes the signature according to this Signature Specs and returns values to be copied to Signature-Input and Signature HTTP headers.toString()
String representation of this object.
-
Method Details
-
sign
Computes the signature according to this Signature Specs and returns values to be copied to Signature-Input and Signature HTTP headers.- Returns:
- Signature result: values to be copied to Signature-Input and Signature headers, and signature base which could be used for logging or debugging
- Throws:
SignatureException
- Problems with signature calculation, e.g. missing or malformatted values in Signature Context, problems with the private key. For detailed reason callSignatureException.getErrorCode()
.- See Also:
-
builder
Returns a builder used to constructSignatureSpec
object- Returns:
- A SignatureSpec builder
-
toString
String representation of this object. It does not contain private key data. -
equals
Compares the specified object with this SignatureSpec for equality. Returns true if the given object is of the same class as this SignatureSpec, and all object fields are equal. -
hashCode
public int hashCode()Returns hash code for this SignatureSpec, which is composed of hash codes of all object fields
-