SOAP Authentication Wrapper Code Samples for Java: Response-Only
- 10 Dec 2024
- 1 Minute à lire
- SombreLumière
- PDF
SOAP Authentication Wrapper Code Samples for Java: Response-Only
- 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
The following code sample shows what you need to include in your webpage if you want to incorporate OneSpan Authentication Server Response-Only authentication.
<%@ page import="com.vasco.identikey.model.Credentials" %>
<%@ page import="com.vasco.identikey.controller.authentication.AuthenticationCommandResponse" %>
<jsp:useBean id="authenticationBean" class="com.vasco.identikey.controller.authentication.AuthenticationBean" scope="page" />
<%
// Credentials have been provided, now perform the request
String userID = request.getParameter("CREDFLD_USERID");
String domain = request.getParameter("CREDFLD_DOMAIN");
String pin = request.getParameter("CREDFLD_CURRENT_PIN");
String dpResponse = request.getParameter("CREDFLD_DP_RESPONSE");
String password = request.getParameter("CREDFLD_STATIC_PASSWORD");
Boolean rhc = Boolean.valueOf("on".equals(request.getParameter("CREDFLD_REQUEST_HOST_CODE")));
Credentials.RequestHostCode reqHostCode = rhc ? Credentials.RequestHostCode.Required : Credentials.RequestHostCode.Optional;
// Execute the command
AuthenticationCommandResponse results = authenticationBean.authUser(domain, userID, pin, dpResponse, password, reqHostCode);
if (results.getReturnCode() == 0) {
%>
<p>OTP Verification Succeeded</p>
<%
}
%>
If you want to include other functionality, go to the sdk_install_dir/Java/src/SampleSite/src/main/webapp/jsp/authentication folder and use the code from the files in there. All the file names identify the function of the code in the file.
Cet article vous a-t-il été utile ?