Interface SignatureStateProcessor
- All Known Implementing Classes:
DefaultSignatureStateProcessor
public interface SignatureStateProcessor
A processor for handling signature states.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Method Summary
Modifier and TypeMethodDescriptionse.idsec.signservice.integration.core.SignatureStatecreateSignatureState(se.idsec.signservice.integration.SignRequestInput requestInput, SignRequestWrapper signRequest, boolean stateless, String ownerId) Creates a signature state, and if thestatelessflag isfalsealso adds the state to the state cache (seegetStateCache()).getSignatureState(se.idsec.signservice.integration.core.SignatureState inputState, String requesterId) Should be called during processing of aSignResponsemessage.Gets the state cache instance that is used by the processor.
-
Method Details
-
createSignatureState
se.idsec.signservice.integration.core.SignatureState createSignatureState(se.idsec.signservice.integration.SignRequestInput requestInput, SignRequestWrapper signRequest, boolean stateless, String ownerId) Creates a signature state, and if thestatelessflag isfalsealso adds the state to the state cache (seegetStateCache()).The
requestInputparameter that is passed must be a "complete" input object, meaning that the instance that is passed must be the instance that is obtained from a call toSignRequestProcessor.preProcess(SignRequestInput, IntegrationServiceConfiguration, String).- Parameters:
requestInput- a fully populated sign request inputsignRequest- the SignRequest that is passed to the signature servicestateless- tells whether this service is running is stateless mode or notownerId- the ID for the caller (optional)- Returns:
- a SignatureState
-
getSignatureState
SignatureSessionState getSignatureState(se.idsec.signservice.integration.core.SignatureState inputState, String requesterId) throws StateException, se.idsec.signservice.integration.core.error.NoAccessException Should be called during processing of aSignResponsemessage.In the call to
SignServiceIntegrationService.processSignResponse(String, String, SignatureState, se.idsec.signservice.integration.SignResponseProcessingParameters)that state is supplied by the caller. The state that is supplied should be the same state as received from callingcreateSignatureState(SignRequestInput, SignRequestWrapper, boolean, String).- Parameters:
inputState- the state received from the callerrequesterId- the requesting actor's id (may be null)- Returns:
- a fully populated signature session state
- Throws:
StateException- for state errorsse.idsec.signservice.integration.core.error.NoAccessException- if the state belongs to someone else (than requesterId)
-
getStateCache
IntegrationServiceStateCache getStateCache()Gets the state cache instance that is used by the processor.- Returns:
- the IntegrationServiceStateCache instance
-