Interface SignResponseMessage

All Superinterfaces:
Serializable

public interface SignResponseMessage extends Serializable
A generic representation of a signature request message.

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 Details

    • getProcessingRequirements

      ProtocolProcessingRequirements getProcessingRequirements()
      Gets the protocol processing requirements for this type of message.
      Returns:
      processing requirements
    • sign

      void sign(PkiCredential signatureCredential) throws SignatureException
      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

      String encode() throws ProtocolException
      Encodes the message according to its protocol to a Base64-encoded string.
      Returns:
      the encoding
      Throws:
      ProtocolException - for encoding errors
    • setRelayState

      void setRelayState(String relayState)
      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

      void setInResponseTo(String requestId)
      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

      void setIssuedAt(Instant issuedAt)
      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

      void setIssuerId(String issuerId)
      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

      void setDestinationUrl(String destinationUrl)
      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

      void setSignResponseResult(SignResponseResult signResponseResult)
      Sets the sign response result object.
      Parameters:
      signResponseResult - the response result
    • getSignerAuthnInfo

      SignerAuthnInfo getSignerAuthnInfo()
      Gets the signer authentication information.
      Returns:
      the authentication information
    • setSignerAuthnInfo

      void setSignerAuthnInfo(SignerAuthnInfo signerAuthnInfo)
      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

      void setSignatureCertificateChain(List<X509Certificate> chain)
      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

      void setSignatureTasks(List<CompletedSignatureTask> signatureTasks)
      Assigns the completed signature task(s), i.e. the signed data.
      Parameters:
      signatureTasks - a list of completed signature task(s)