Interface SignedDocumentProcessor<T,X extends AdesObject>
- Type Parameters:
T- the type of documents that this processor handlesX- the type of AdES objects used for this document type
- All Superinterfaces:
DocumentProcessor<T>
- All Known Implementing Classes:
AbstractSignedDocumentProcessor
Interface for a processor of a signed document.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Method Summary
Modifier and TypeMethodDescriptionbuildSignedDocument(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 aSignTaskDatareceived in a sign response containing a signature and aTbsDocumentfrom the corresponding sign request the method compiles a complete signed document.Gets the processing configuration that this processor is configured with.booleansupports(se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData signData) Predicate that tells if the supplied sign data can be handled by this processor.voidvalidateAdesObject(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.voidvalidateSignedDocument(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 aSignTaskDatareceived in a sign response containing a signature and aTbsDocumentfrom the corresponding sign request the method compiles a complete signed document.- Parameters:
tbsDocument- the to-be-signed documentsignedData- 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 requestparameters- 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 validatesignerCertificate- the signer certificatesignTaskData- the sign task dataparameters- processing parameters received from the callerrequestID- 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 objectsigningCertificate- the signing certificatesignTaskData- the sign task datasignRequest- the sign requestsignResponse- the sign responseparameters- processing parameters received from the caller- Throws:
se.idsec.signservice.integration.core.error.SignServiceIntegrationException- for validation errors
-
getProcessingConfiguration
Gets the processing configuration that this processor is configured with.- Returns:
- the processing configuration
-