Interface SignResponseMessage
- All Superinterfaces:
Serializable
This representation covers both successful and error response messages.
Note that the interface defines both getters and setters. The setters are intended for the SignService engine that builds the response message, and even though there is no obvious use for the getters, it would be strange to leave them out. If not, they can be used by logging functions.
-
Method Summary
Modifier and TypeMethodDescriptionencode()
Encodes the message according to its protocol to a Base64-encoded string.Gets the "destination URL", i.e., the URL to where this response message is sent.Gets the unique identifier for the corresponding request message (SignRequestMessage.getRequestId()
).Gets the issuance instant for the message.Gets the issuer ID for the SignService that issued this response message.Gets the protocol processing requirements for this type of message.Gets the "relay state" parameter that is associated with the message.Gets the signature certificate chain, starting with the issued signing certificate, and followed by any CA certificates that can be used to verify the previous certificate in the sequence, ending with a self-signed root certificate.Gets the completed signature tasks, i.e. the signed data.Gets the signer authentication information.Gets the sign response result object.void
setDestinationUrl
(String destinationUrl) Assigns the "destination URL", i.e., the URL to where this response message is sent.void
setInResponseTo
(String requestId) Assigns the unique identifier for the corresponding request message (SignRequestMessage.getRequestId()
).void
setIssuedAt
(Instant issuedAt) Assigns the issuance instant for the message.void
setIssuerId
(String issuerId) Assigns the issuer ID for the SignService that issued this response message.void
setRelayState
(String relayState) Assigns the relay state parameter associated with this message.void
Assigns the signature certificate chain.void
setSignatureTasks
(List<CompletedSignatureTask> signatureTasks) Assigns the completed signature task(s), i.e. the signed data.void
setSignerAuthnInfo
(SignerAuthnInfo signerAuthnInfo) Assigns the signer authentication information.void
setSignResponseResult
(SignResponseResult signResponseResult) Sets the sign response result object.void
sign
(PkiCredential signatureCredential) Signs the message using the supplied signing credential.
-
Method Details
-
getProcessingRequirements
ProtocolProcessingRequirements getProcessingRequirements()Gets the protocol processing requirements for this type of message.- Returns:
- processing requirements
-
sign
Signs the message using the supplied signing credential.Requirements for how the signature is created is controlled by the protocol itself along with settings in the protocol profile.
- Parameters:
signatureCredential
- the credential to use when signing- Throws:
SignatureException
- for signature errors
-
encode
Encodes the message according to its protocol to a Base64-encoded string.- Returns:
- the encoding
- Throws:
ProtocolException
- for encoding errors
-
setRelayState
Assigns the relay state parameter associated with this message.- Parameters:
relayState
- the relay state
-
getRelayState
String getRelayState()Gets the "relay state" parameter that is associated with the message.- Returns:
- the relay state parameter, or null if not available
-
getInResponseTo
String getInResponseTo()Gets the unique identifier for the corresponding request message (SignRequestMessage.getRequestId()
).- Returns:
- the request ID for the corresponding request message
-
setInResponseTo
Assigns the unique identifier for the corresponding request message (SignRequestMessage.getRequestId()
).- Parameters:
requestId
- the request ID for the corresponding request message
-
getIssuedAt
Instant getIssuedAt()Gets the issuance instant for the message.- Returns:
- the issuance instant
-
setIssuedAt
Assigns the issuance instant for the message.Implementations must default to use the current time if this field is not explicitly assigned.
- Parameters:
issuedAt
- the issuance instant
-
getIssuerId
String getIssuerId()Gets the issuer ID for the SignService that issued this response message.- Returns:
- the issuer ID
-
setIssuerId
Assigns the issuer ID for the SignService that issued this response message.- Parameters:
issuerId
- the issuer ID (SignService ID)
-
getDestinationUrl
String getDestinationUrl()Gets the "destination URL", i.e., the URL to where this response message is sent.- Returns:
- the destination URL
-
setDestinationUrl
Assigns the "destination URL", i.e., the URL to where this response message is sent.- Parameters:
destinationUrl
- the destination URL
-
getSignResponseResult
SignResponseResult getSignResponseResult()Gets the sign response result object.- Returns:
- the SignResponseResult
-
setSignResponseResult
Sets the sign response result object.- Parameters:
signResponseResult
- the response result
-
getSignerAuthnInfo
SignerAuthnInfo getSignerAuthnInfo()Gets the signer authentication information.- Returns:
- the authentication information
-
setSignerAuthnInfo
Assigns the signer authentication information.- Parameters:
signerAuthnInfo
- the authentication information
-
getSignatureCertificateChain
List<X509Certificate> getSignatureCertificateChain()Gets the signature certificate chain, starting with the issued signing certificate, and followed by any CA certificates that can be used to verify the previous certificate in the sequence, ending with a self-signed root certificate.- Returns:
- the signature certificate chain
-
setSignatureCertificateChain
Assigns the signature certificate chain.The chain must start with the issued signing certificate, and be followed by any CA certificates that can be used to verify the previous certificate in the sequence, and end with a self-signed root certificate.
- Parameters:
chain
- the signature certificate chain
-
getSignatureTasks
List<CompletedSignatureTask> getSignatureTasks()Gets the completed signature tasks, i.e. the signed data.- Returns:
- a list of completed signature tasks
-
setSignatureTasks
Assigns the completed signature task(s), i.e. the signed data.- Parameters:
signatureTasks
- a list of completed signature task(s)
-