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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEnsures that theprocessingConfigproperty is assigned.protected List<se.idsec.signservice.integration.authentication.SignerIdentityAttributeValue> processAttributes(se.swedenconnect.schemas.csig.dssext_1_1.SignerAssertionInfo signerAssertionInfo, SignRequestWrapper signRequest) Extracts the attributes from the response and validates that we received all attributes that were requested (if strict processing is enabled).protected longprocessAuthenticationInstant(se.swedenconnect.schemas.csig.dssext_1_1.ContextInfo contextInfo, SignRequestWrapper signRequest, SignResponseWrapper signResponse) Validates that the received authentication instant is OK.protected StringprocessAuthnContextClassRef(se.swedenconnect.schemas.csig.dssext_1_1.ContextInfo contextInfo, SignRequestWrapper signRequest) se.idsec.signservice.integration.authentication.SignerAssertionInformationprocessSignerAssertionInfo(SignResponseWrapper signResponse, SignatureSessionState state, se.idsec.signservice.integration.SignResponseProcessingParameters parameters) Processes and validates theSignerAssertionInforeceived in the suppliedSignResponseand creates aSignerAssertionInformationobject that is to be returned back to the caller.protected booleanTells if the display of a sign message with a MustShow flag set was requested.voidsetProcessingConfig(SignResponseProcessingConfig processingConfig) Assigns the processing config settings.
-
Field Details
-
processingConfig
Processing config.
-
-
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 theSignerAssertionInforeceived in the suppliedSignResponseand creates aSignerAssertionInformationobject that is to be returned back to the caller.- Specified by:
processSignerAssertionInfoin interfaceSignerAssertionInfoProcessor- Parameters:
signResponse- the SignResponsestate- the stateparameters- optional processing parameters- Returns:
- a SignerAssertionInformation object
- Throws:
se.idsec.signservice.integration.core.error.SignServiceIntegrationException- for processing errors
-
requireDisplaySignMessageProof
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 instantsignRequest- the sign requestsignResponse- 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
Assigns the processing config settings.- Parameters:
processingConfig- the processing config settings
-
afterPropertiesSet
@PostConstruct public void afterPropertiesSet()Ensures that theprocessingConfigproperty is assigned. By defaultSignResponseProcessingConfig.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.
-