Class DefaultSignerAssertionInfoProcessor

java.lang.Object
se.idsec.signservice.integration.process.impl.DefaultSignerAssertionInfoProcessor
All Implemented Interfaces:
SignerAssertionInfoProcessor

public class DefaultSignerAssertionInfoProcessor extends Object implements SignerAssertionInfoProcessor
Default implementation of the SignerAssertionInfoProcessor interface.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Field Details

  • Constructor Details

    • DefaultSignerAssertionInfoProcessor

      public DefaultSignerAssertionInfoProcessor()
  • Method Details

    • processSignerAssertionInfo

      public se.idsec.signservice.integration.authentication.SignerAssertionInformation processSignerAssertionInfo(@Nonnull SignResponseWrapper signResponse, @Nonnull SignatureSessionState state, se.idsec.signservice.integration.SignResponseProcessingParameters parameters) throws se.idsec.signservice.integration.core.error.SignServiceIntegrationException
      Processes and validates the SignerAssertionInfo received in the supplied SignResponse and creates a SignerAssertionInformation object that is to be returned back to the caller.
      Specified by:
      processSignerAssertionInfo in interface SignerAssertionInfoProcessor
      Parameters:
      signResponse - the SignResponse
      state - the state
      parameters - optional processing parameters
      Returns:
      a SignerAssertionInformation object
      Throws:
      se.idsec.signservice.integration.core.error.SignServiceIntegrationException - for processing errors
    • requireDisplaySignMessageProof

      protected boolean requireDisplaySignMessageProof(SignatureSessionState state)
      Tells if the display of a sign message with a MustShow flag set was requested.
      Parameters:
      state - the state
      Returns:
      if sign message display is required true is returned, otherwise false
    • processAttributes

      protected List<se.idsec.signservice.integration.authentication.SignerIdentityAttributeValue> processAttributes(se.swedenconnect.schemas.csig.dssext_1_1.SignerAssertionInfo signerAssertionInfo, SignRequestWrapper signRequest) throws se.idsec.signservice.integration.core.error.SignServiceIntegrationException
      Extracts the attributes from the response and validates that we received all attributes that were requested (if strict processing is enabled).
      Parameters:
      signerAssertionInfo - the signer info (including the received attributes)
      signRequest - the request
      Returns:
      a list of attributes
      Throws:
      se.idsec.signservice.integration.core.error.SignServiceIntegrationException - for validation errors
    • processAuthenticationInstant

      protected long processAuthenticationInstant(se.swedenconnect.schemas.csig.dssext_1_1.ContextInfo contextInfo, SignRequestWrapper signRequest, SignResponseWrapper signResponse) throws se.idsec.signservice.integration.core.error.SignServiceIntegrationException
      Validates that the received authentication instant is OK.
      Parameters:
      contextInfo - the context info holding the authn instant
      signRequest - the sign request
      signResponse - the sign response
      Throws:
      se.idsec.signservice.integration.core.error.SignServiceIntegrationException - for validation errors
    • processAuthnContextClassRef

      protected String processAuthnContextClassRef(se.swedenconnect.schemas.csig.dssext_1_1.ContextInfo contextInfo, SignRequestWrapper signRequest) throws se.idsec.signservice.integration.core.error.SignServiceIntegrationException
      Throws:
      se.idsec.signservice.integration.core.error.SignServiceIntegrationException
    • setProcessingConfig

      public void setProcessingConfig(SignResponseProcessingConfig processingConfig)
      Assigns the processing config settings.
      Parameters:
      processingConfig - the processing config settings
    • afterPropertiesSet

      @PostConstruct public void afterPropertiesSet()
      Ensures that the processingConfig property is assigned. By default SignResponseProcessingConfig.defaultSignResponseProcessingConfig() is used.

      Note: If executing in a Spring Framework environment this method is automatically invoked after all properties have been assigned. Otherwise it should be explicitly invoked.