Package se.idsec.signservice.integration
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 Summary
Modifier and TypeFieldDescriptionstatic final String
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. -
Method Summary
Modifier and TypeMethodDescriptioncreateSignRequest
(SignRequestInput signRequestInput) Creates a SignRequest message that is to be posted to the signature service.getConfiguration
(String policy) Given the name of a SignService Integration policy, the method returns the default settings used for this policy.Returns a list of names of the policies that are defined for this instance of the SignService Integration Service.default String
Returns the version identifier for the current version of the SignService Integration Service.processSignResponse
(String signResponse, String relayState, SignatureState state, SignResponseProcessingParameters parameters) When the service that has ordered the signing operation receives the sign response message it should invoke this method to process this response.
-
Field Details
-
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
SignRequestData createSignRequest(SignRequestInput signRequestInput) throws InputValidationException, SignServiceIntegrationException 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 inputSignServiceIntegrationException
- for errors creating the SignRequest
-
processSignResponse
SignatureResult processSignResponse(String signResponse, String relayState, SignatureState state, SignResponseProcessingParameters parameters) throws SignResponseCancelStatusException, SignResponseErrorStatusException, SignServiceIntegrationException 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 stateparameters
- 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 operationSignResponseErrorStatusException
- the sign service reported an errorSignServiceIntegrationException
- for validation and processing errors
-
getConfiguration
IntegrationServiceDefaultConfiguration getConfiguration(String policy) throws PolicyNotFoundException 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
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
Returns the version identifier for the current version of the SignService Integration Service.- Returns:
- version string
-