public abstract class SignatureStarter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
callbackArgument |
protected java.lang.String |
certificate |
protected PKCertificate |
certificateInfo |
protected RestPkiClient |
client |
protected boolean |
done |
protected boolean |
ignoreRevocationStatusUnknown |
protected java.lang.String |
securityContextId |
protected java.lang.String |
signaturePolicyId |
| Constructor and Description |
|---|
SignatureStarter(RestPkiClient client)
Create a new instance using the given RestPkiClient.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCallbackArgument() |
PKCertificate |
getCertificateInfo()
If the signer's certificate was given, this method returns its information (can only be
called after calling the start() or startWithWebPki() methods).
|
RestPkiClient |
getClient() |
java.lang.String |
getSecurityContext() |
java.lang.String |
getSecurityContextId()
Deprecated.
|
java.lang.String |
getSignaturePolicyId() |
java.lang.String |
getSignerCertificate() |
void |
setCallbackArgument(java.lang.String argument)
Optional, sets a callback argument that will be returned on the second step.
|
void |
setClient(RestPkiClient client) |
void |
setIgnoreRevocationStatusUnknown(boolean ignoreRevocationStatusUnknown)
Sets the option of "IgnoreRevocationStatusUnknown".
|
void |
setSecurityContext(SecurityContext securityContext)
Sets the security context to be used to validate the signature.
|
java.lang.String |
setSecurityContextId()
Deprecated.
|
void |
setSignaturePolicy(SignaturePolicy signaturePolicy)
Sets the signature policy to be used for the signature.
|
void |
setSignerCertificate(java.lang.String certificate)
Sets the signer's certificate.
|
abstract ClientSideSignatureInstructions |
start()
Performs the first step, should be called after setting the necessary parameters.
|
abstract java.lang.String |
startWithWebPki()
Performs the first step, should be called after setting the necessary parameters.
|
protected RestPkiClient client
protected java.lang.String certificate
protected java.lang.String signaturePolicyId
protected java.lang.String securityContextId
protected java.lang.String callbackArgument
protected boolean ignoreRevocationStatusUnknown
protected boolean done
protected PKCertificate certificateInfo
public SignatureStarter(RestPkiClient client)
client - the RestPkiClient which shall be used.public java.lang.String getSignerCertificate()
public void setSignerCertificate(java.lang.String certificate)
certificate - The signer's certificate, encoded in Base64. If you're using the Web PKI
component on the client-side, this is the format given by the component.public java.lang.String getSignaturePolicyId()
public void setSignaturePolicy(SignaturePolicy signaturePolicy)
signaturePolicy - The signature policy. Depending on the policy, it might also be
necessary to set a security context.public java.lang.String getSecurityContext()
@Deprecated public java.lang.String getSecurityContextId()
public void setSecurityContext(SecurityContext securityContext)
securityContext - The security context to be used to validate the signature.@Deprecated public java.lang.String setSecurityContextId()
public java.lang.String getCallbackArgument()
public void setCallbackArgument(java.lang.String argument)
The callback argument can be used to simplify the code of the client application. For instance, it might be the ID of the document being signed.
As the PDF content, the callback argument is also stored in the server with AES-128 encryption using a key which is never stored by the server, therefore it cannot read the value on its own, protecting it against compromise even in the event of a complete data leakage.
argument - The callback argument, a string whose UTF-8 encoding must not exceed 200 bytes.public RestPkiClient getClient()
public void setClient(RestPkiClient client)
public void setIgnoreRevocationStatusUnknown(boolean ignoreRevocationStatusUnknown)
ignoreRevocationStatusUnknown - The option of "IgnoreRevocationStatusUnknown".public abstract ClientSideSignatureInstructions start() throws RestException
RestException - if an error occurs when calling REST PKI.public abstract java.lang.String startWithWebPki()
throws RestException
RestException - if an error occurs when calling REST PKIpublic PKCertificate getCertificateInfo()