Interface SignedDocumentProcessor<T,X extends AdesObject>

Type Parameters:
T - the type of documents that this processor handles
X - the type of AdES objects used for this document type
All Superinterfaces:
DocumentProcessor<T>
All Known Implementing Classes:
AbstractSignedDocumentProcessor

public interface SignedDocumentProcessor<T,X extends AdesObject> extends DocumentProcessor<T>
Interface for a processor of a signed document.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Method Summary

    Modifier and Type
    Method
    Description
    buildSignedDocument(se.idsec.signservice.integration.document.TbsDocument tbsDocument, se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData signedData, List<X509Certificate> signerCertificateChain, SignRequestWrapper signRequest, se.idsec.signservice.integration.SignResponseProcessingParameters parameters)
    Given a SignTaskData received in a sign response containing a signature and a TbsDocument from the corresponding sign request the method compiles a complete signed document.
    Gets the processing configuration that this processor is configured with.
    boolean
    supports(se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData signData)
    Predicate that tells if the supplied sign data can be handled by this processor.
    void
    validateAdesObject(X adesObject, X509Certificate signingCertificate, se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData signTaskData, SignRequestWrapper signRequest, SignResponseWrapper signResponse, se.idsec.signservice.integration.SignResponseProcessingParameters parameters)
    Given a AdES object from the signature the method validates that it is valid.
    void
    validateSignedDocument(T signedDocument, X509Certificate signerCertificate, se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData signTaskData, se.idsec.signservice.integration.SignResponseProcessingParameters parameters, String requestID)
    Given a compiled signed document the method validates its signature.

    Methods inherited from interface se.idsec.signservice.integration.document.DocumentProcessor

    getDocumentDecoder, getDocumentEncoder
  • Method Details

    • supports

      boolean supports(@Nonnull se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData signData)
      Predicate that tells if the supplied sign data can be handled by this processor.
      Parameters:
      signData - the signed data
      Returns:
      if the data can be processed by this instance true is returned, otherwise false
    • buildSignedDocument

      CompiledSignedDocument<T,X> buildSignedDocument(@Nonnull se.idsec.signservice.integration.document.TbsDocument tbsDocument, @Nonnull se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData signedData, @Nonnull List<X509Certificate> signerCertificateChain, @Nonnull SignRequestWrapper signRequest, @Nullable se.idsec.signservice.integration.SignResponseProcessingParameters parameters) throws se.idsec.signservice.integration.core.error.SignServiceIntegrationException
      Given a SignTaskData received in a sign response containing a signature and a TbsDocument from the corresponding sign request the method compiles a complete signed document.
      Parameters:
      tbsDocument - the to-be-signed document
      signedData - the signed data (signature)
      signerCertificateChain - the certificate chain for the signer (starting with the signer certificate and ending with the root)
      signRequest - the corresponding sign request
      parameters - processing parameters received from the caller
      Returns:
      a compiled signed document
      Throws:
      se.idsec.signservice.integration.core.error.SignServiceIntegrationException - for processing errors
    • validateSignedDocument

      void validateSignedDocument(@Nonnull T signedDocument, @Nonnull X509Certificate signerCertificate, @Nonnull se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData signTaskData, @Nullable se.idsec.signservice.integration.SignResponseProcessingParameters parameters, @Nonnull String requestID) throws se.idsec.signservice.integration.core.error.SignServiceIntegrationException
      Given a compiled signed document the method validates its signature.

      The signer certificate has already been validated so explicit validation of the signer certificate is not needed.

      Parameters:
      signedDocument - the document to validate
      signerCertificate - the signer certificate
      signTaskData - the sign task data
      parameters - processing parameters received from the caller
      requestID - the ID for this operation (for logging)
      Throws:
      se.idsec.signservice.integration.core.error.SignServiceIntegrationException - for validation errors
    • validateAdesObject

      void validateAdesObject(@Nonnull X adesObject, @Nonnull X509Certificate signingCertificate, @Nonnull se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData signTaskData, @Nonnull SignRequestWrapper signRequest, @Nonnull SignResponseWrapper signResponse, @Nullable se.idsec.signservice.integration.SignResponseProcessingParameters parameters) throws se.idsec.signservice.integration.core.error.SignServiceIntegrationException
      Given a AdES object from the signature the method validates that it is valid.
      Parameters:
      adesObject - the AdES object
      signingCertificate - the signing certificate
      signTaskData - the sign task data
      signRequest - the sign request
      signResponse - the sign response
      parameters - processing parameters received from the caller
      Throws:
      se.idsec.signservice.integration.core.error.SignServiceIntegrationException - for validation errors
    • getProcessingConfiguration

      @Nonnull SignResponseProcessingConfig getProcessingConfiguration()
      Gets the processing configuration that this processor is configured with.
      Returns:
      the processing configuration