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 Type
    Method
    Description
    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 the stateless flag is false also adds the state to the state cache (see getStateCache()).
    getSignatureState(se.idsec.signservice.integration.core.SignatureState inputState, String requesterId)
    Should be called during processing of a SignResponse message.
    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 the stateless flag is false also adds the state to the state cache (see getStateCache()).

      The requestInput parameter 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 to SignRequestProcessor.preProcess(SignRequestInput, IntegrationServiceConfiguration, String).

      Parameters:
      requestInput - a fully populated sign request input
      signRequest - the SignRequest that is passed to the signature service
      stateless - tells whether this service is running is stateless mode or not
      ownerId - 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 a SignResponse message.

      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 calling createSignatureState(SignRequestInput, SignRequestWrapper, boolean, String).

      Parameters:
      inputState - the state received from the caller
      requesterId - the requesting actor's id (may be null)
      Returns:
      a fully populated signature session state
      Throws:
      StateException - for state errors
      se.idsec.signservice.integration.core.error.NoAccessException - if the state belongs to someone else (than requesterId)
    • getStateCache

      Gets the state cache instance that is used by the processor.
      Returns:
      the IntegrationServiceStateCache instance