You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 17, 2023. It is now read-only.
I need to use embedded signing using a pdf template in my web application. I nees also to generate an "One Time Password" to protect access to the signing window. So i need to use TemplateSignatureRequest using a signer with an accesscode :
Signer client = new Signer();
client.setNameOrRole(name+" "+surname);
client.setAccessCode(otp);
signers.put("Client", client);
But then no access code is requested to sign the documet. I think there is a bug in TemplateSignatureRequest, so I extended it in my application with a new object "TemplateSignatureWithPinRequest" fixing it, but i need a confirm of it.
I added Pin code in getPostFields() method
public Map<String, Serializable> getPostFields() throws HelloSignException {
Map<String, Serializable> fields = super.getPostFields();
try {
// Mandatory fields
List templateIds = getTemplateIds();
for (int i = 0; i < templateIds.size(); i++) {
fields.put(TEMPLATE_IDS + "[" + i + "]", templateIds.get(i));
}
Map<String, Signer> signerz = getSigners();
for (String role : signerz.keySet()) {
Signer s = signerz.get(role);
fields.put(TEMPLATE_SIGNERS + "[" + role + "][" + TEMPLATE_SIGNERS_EMAIL + "]", s.getEmail());
fields.put(TEMPLATE_SIGNERS + "[" + role + "][" + TEMPLATE_SIGNERS_NAME + "]", s.getNameOrRole());
if (s.getAccessCode() != null) {
fields.put(TEMPLATE_SIGNERS + "[" + role + "][" + SIGREQ_SIGNER_PIN + "]", s.getAccessCode());
}
}
I need to use embedded signing using a pdf template in my web application. I nees also to generate an "One Time Password" to protect access to the signing window. So i need to use TemplateSignatureRequest using a signer with an accesscode :
Signer client = new Signer();
client.setNameOrRole(name+" "+surname);
client.setAccessCode(otp);
signers.put("Client", client);
But then no access code is requested to sign the documet. I think there is a bug in TemplateSignatureRequest, so I extended it in my application with a new object "TemplateSignatureWithPinRequest" fixing it, but i need a confirm of it.
I added Pin code in getPostFields() method
public Map<String, Serializable> getPostFields() throws HelloSignException {
Map<String, Serializable> fields = super.getPostFields();
try {
// Mandatory fields
List templateIds = getTemplateIds();
for (int i = 0; i < templateIds.size(); i++) {
fields.put(TEMPLATE_IDS + "[" + i + "]", templateIds.get(i));
}
Map<String, Signer> signerz = getSigners();
for (String role : signerz.keySet()) {
Signer s = signerz.get(role);
fields.put(TEMPLATE_SIGNERS + "[" + role + "][" + TEMPLATE_SIGNERS_EMAIL + "]", s.getEmail());
fields.put(TEMPLATE_SIGNERS + "[" + role + "][" + TEMPLATE_SIGNERS_NAME + "]", s.getNameOrRole());
if (s.getAccessCode() != null) {
fields.put(TEMPLATE_SIGNERS + "[" + role + "][" + SIGREQ_SIGNER_PIN + "]", s.getAccessCode());
}
}