Package org.faceless.publisher.ext
Class GlobalSignSignatureExtension
java.lang.Object
org.faceless.publisher.ext.DefaultSignatureExtension
org.faceless.publisher.ext.GlobalSignSignatureExtension
- All Implemented Interfaces:
ReportFactoryExtension,SignatureExtension
Supports GlobalSign DSS signatures with the "globalsign.dss" or "globalsign.qss" engine.
Requires "apikey" and "apisecret" (or a CallbackHandler that can supply them)
as well as "keystore". KeyStore must have the mTLS certificate. The "url"
parameter is optional.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(org.faceless.publisher.type.FormSignatureResource resource, FormSignature field) Sign the signatureGlobalSignDSSManagergetGlobalSignDSSManager(org.faceless.publisher.type.FormSignatureResource resource) Get a new GlobalSignDSSManager based on the specified resourceGlobalSignDSSManagerGet the factory-wide GlobalSignDSSManager, as set bysetSharedGlobalSignDSSManager(GlobalSignDSSManager)SignatureHandlerFactorygetSignatureFactory(org.faceless.publisher.type.FormSignatureResource resource, GlobalSignDSSManager dss) Return a new SignatureFactory based on the identity specified in the resource.voidprepare(org.faceless.publisher.type.FormSignatureResource resource) If this object returned true fromsupports(org.faceless.publisher.type.FormSignatureResource), this method is called to prepare the signature.voidsetSharedGlobalSignDSSManager(GlobalSignDSSManager dss) Set the factory-wide GlobalSignDSSManager.booleansupports(org.faceless.publisher.type.FormSignatureResource resource) Return true if this SignatureExtension supports the specified Signature type.Methods inherited from class org.faceless.publisher.ext.DefaultSignatureExtension
applyBasics, applyTSA, getKeyStoreAuthorization, getParameterMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.faceless.publisher.ext.ReportFactoryExtension
configure, load, register, register, unregister, unregister
-
Constructor Details
-
GlobalSignSignatureExtension
public GlobalSignSignatureExtension()
-
-
Method Details
-
supports
public boolean supports(org.faceless.publisher.type.FormSignatureResource resource) Return true if this SignatureExtension supports the specified Signature type.- Specified by:
supportsin interfaceSignatureExtension- Overrides:
supportsin classDefaultSignatureExtension
-
prepare
public void prepare(org.faceless.publisher.type.FormSignatureResource resource) If this object returned true fromsupports(org.faceless.publisher.type.FormSignatureResource), this method is called to prepare the signature. This may involve validating, setting default attributes etc.- Specified by:
preparein interfaceSignatureExtension- Overrides:
preparein classDefaultSignatureExtension
-
getGlobalSignDSSManager
public GlobalSignDSSManager getGlobalSignDSSManager(org.faceless.publisher.type.FormSignatureResource resource) throws GeneralSecurityException, IOException Get a new GlobalSignDSSManager based on the specified resource- Parameters:
resource- a resource which may specify parameters such as "apikey", "apisecret", "keystore" etc.- Returns:
- a GlobalSignDSSManager
- Throws:
GeneralSecurityException- if the required parameters are unspecified or incorrectIOException- if the required parameters cannot be used to log in
-
getSignatureFactory
public SignatureHandlerFactory getSignatureFactory(org.faceless.publisher.type.FormSignatureResource resource, GlobalSignDSSManager dss) throws GeneralSecurityException, IOException Return a new SignatureFactory based on the identity specified in the resource. The "identity" parameter is required, and should be an email (for QSS) or X.500 name (for DSS)- Returns:
- a SignatureHandlerFactory
- Throws:
GeneralSecurityExceptionIOException
-
apply
public void apply(org.faceless.publisher.type.FormSignatureResource resource, FormSignature field) throws GeneralSecurityException, IOException Sign the signature- Specified by:
applyin interfaceSignatureExtension- Overrides:
applyin classDefaultSignatureExtension- Throws:
GeneralSecurityExceptionIOException
-