SOAP Signature Wrapper Code Samples for Java: Standard Signature
- 10 Dec 2024
- 1 Minute à lire
- SombreLumière
- PDF
SOAP Signature Wrapper Code Samples for Java: Standard Signature
- Mis à jour le 10 Dec 2024
- 1 Minute à lire
- SombreLumière
- PDF
The content is currently unavailable in French. You are viewing the default English version.
Résumé de l’article
Avez-vous trouvé ce résumé utile ?
Merci pour vos commentaires
Below are code samples that need to be included in the webpages where the OneSpan Authentication Server standard signature functionality is to be integrated.
<%@ page import="com.vasco.identikey.model.Signature" %>
<%@ page import="com.vasco.identikey.controller.IdentikeyError" %>
<%@ page import="com.vasco.identikey.controller.signature.SignatureCommandResponse" %>
<%@ page import="org.w3._2001.xmlschema.UnsignedInt" %>
<!-- Signature details have been provided, now perform the request -->
<%
String userID = request.getParameter("SIGNFLD_USERID");
String domain = request.getParameter("SIGNFLD_DOMAIN");
String signature = request.getParameter("SIGNFLD_SIGNATURE");
Boolean rcc = Boolean.valueOf("on".equals(request.getParameter("SIGNFLD_REQUEST_CONFIRM_CODE")));
java.util.List<String> fields = new java.util.ArrayList();
fields.add(request.getParameter("SIGNFLD_DATA_FIELD_1"));
fields.add(request.getParameter("SIGNFLD_DATA_FIELD_2"));
fields.add(request.getParameter("SIGNFLD_DATA_FIELD_3"));
fields.add(request.getParameter("SIGNFLD_DATA_FIELD_4"));
fields.add(request.getParameter("SIGNFLD_DATA_FIELD_5"));
fields.add(request.getParameter("SIGNFLD_DATA_FIELD_6"));
fields.add(request.getParameter("SIGNFLD_DATA_FIELD_7"));
fields.add(request.getParameter("SIGNFLD_DATA_FIELD_8"));
java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
java.util.Date deferredTime = null;
try {
String s = request.getParameter("SIGNFLD_DEFERRED_DATETIME");
if (s != null && !"".equals(s))
deferredTime = format.parse(s);
} catch(Exception e) {}
UnsignedInt deferredEvent = null;
try {
deferredEvent = new UnsignedInt(Integer.parseInt(request.getParameter("SIGNFLD_DEFERRED_EVENT_VALUE")));
} catch(Exception e) {}
Signature.RequestConfirmationCode reqConfCode = rcc ? Signature.RequestConfirmationCode.Required : Signature.RequestConfirmationCode.Optional;
// Execute the command
SignatureCommandResponse results = signatureBean.authSignature(domain, userID, signature, fields, deferredTime, deferredEvent, reqConfCode);
if (results.getReturnCode() == 0) {
// Success
}
%>
Cet article vous a-t-il été utile ?