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.
Repository navigation
This repository was archived by the owner on Oct 17, 2023. It is now read-only.
TemplateSignatureRequest not allow to put signer accesscode #89
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());
}
}
Thanks, looks like this is a feature missing from the SDK, it sounds like what you are doing is correct to me. Does that solution work for you until we add support to the SDK in general?
Activity
jspaetzel commentedon Jul 26, 2019
Thanks, looks like this is a feature missing from the SDK, it sounds like what you are doing is correct to me. Does that solution work for you until we add support to the SDK in general?