Implement SignerBase abstract class |
Host Web application must provide own implementation of base class SignerBase. You must create own class inherited from SignerBase and implement or override its methods. Recommended implementation is as async/await.
To sign documents (PDF, XML, DOCX, ...) by the ASDSoft.SignTools library, it is recommended to use DocumentSignerBaseTIdentification as the base class.
CreateSignatureSession(CreateSessionRequest)
This method called by component infrastructure (callback) when invoked any method based on StartSignatureInProcess. Main method for implementation creating signature session by app request.
ProcessSigning(X509Certificate2, SignatureInfo)
This method called by component infrastructure (callback) when signature by the client is created. In this method, you can save signature to your required file, such as PDF, XML, etc...
GetDocument(IDocumentLinkContent)
This method called by component infrastructure (callback) when the user clicks in client window for showing or downloading the signing document in the browser. In this method, you can return the binary content of the required signing document.
GetContent(ContentBase, X509Certificate2)
This method called by component infrastructure (callback) when the user select certificate for signing before signing is creating. In this method, you can return the binary content of signing data or hash.
ConfigureX509ChainForValidation(X509Chain, X509Certificate2, SignatureRequest)
This method called by component infrastructure (callback) when a client application sends to server list of available client certificates for its filtering to only accepted certificates. In this method, you can override default implementation of configuration certificate chain validation.
ValidateCertificateExtended(X509Certificate2, SignatureRequest, String)
This method called by component infrastructure (callback) when a client application sends to server list of available client certificates for its filtering to only accepted certificates. In this method, you can add your specific custom filtering of accepted certificates.
ValidateQualifiedCertificate(X509Certificate2, EuTslStatusInfo, SignatureRequest, String)
This method called by component infrastructure (callback) when a client application sends to server list of available client certificates for its filtering to only accepted certificates. In this method, you can add your specific custom filtering of accepted qualified certificates.
OnProcessSigningEnd(String, X509Certificate2, SignatureInfo)
This method called when all signatures in session processed by ProcessSigning(X509Certificate2, SignatureInfo). Default implementation is empty.