Interface SignServiceIntegrationService

All Known Subinterfaces:
ExtendedSignServiceIntegrationService

public interface SignServiceIntegrationService
Interface describing the API for the SignService Integration Service.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Field Details

    • OWNER_ID_EXTENSION_KEY

      static final String OWNER_ID_EXTENSION_KEY
      In the cases when the SignService Integration Service is running as a stand-alone service in stateful mode there is a need to register the actor ownership of session states and other cached objects. In these cases the stand-alone service adds an extension, "_operation_owner_id", holding the identity of the relying party that is making the call.
      See Also:
  • Method Details

    • createSignRequest

      Creates a SignRequest message that is to be posted to the signature service.
      Parameters:
      signRequestInput - the requirements and input for how to create the SignRequest
      Returns:
      a SignRequestData object containing the encoded (and signed) SignRequest along with additional parameters
      Throws:
      InputValidationException - for errors in the supplied input
      SignServiceIntegrationException - for errors creating the SignRequest
    • processSignResponse

      When the service that has ordered the signing operation receives the sign response message it should invoke this method to process this response. The processing will validate the signature of each signed document and return the signed document(s) along with metadata about the signature process.

      Note: The relayState must be equal to supplied state (SignatureState.getId()). This parameter is redundant, but included for pedagogical reasons since the RelayState POST parameter is received.

      Parameters:
      signResponse - the Base64-encoded SignResponse message (from the EidSignResponse POST parameter)
      relayState - the relayState (from the RelayState POST parameter)
      state - the signature state
      parameters - optional processing parameter giving directives about the processing
      Returns:
      a SignatureResult object containing the signed documents and metadata about the signature
      Throws:
      SignResponseCancelStatusException - the sign service reported that the user cancelled the operation
      SignResponseErrorStatusException - the sign service reported an error
      SignServiceIntegrationException - for validation and processing errors
    • getConfiguration

      Given the name of a SignService Integration policy, the method returns the default settings used for this policy.
      Parameters:
      policy - the policy name (null is interpreted as the default policy)
      Returns:
      the default service configuration for the given policy
      Throws:
      PolicyNotFoundException - if the given policy does not exist
    • getPolicies

      List<String> getPolicies()
      Returns a list of names of the policies that are defined for this instance of the SignService Integration Service.
      Returns:
      a non-empty list of policy names
    • getVersion

      default String getVersion()
      Returns the version identifier for the current version of the SignService Integration Service.
      Returns:
      version string