--- title: "SOAP Authentication Wrapper Code Samples for Java: Response-Only" slug: "oas-fullsdk-pgjava-soap-authentication-wrapper-code-sample-response-only-3-28" updated: 2025-07-04T10:05:18Z published: 2025-07-07T15:34:12Z canonical: "docs.onespan.com/oas-fullsdk-pgjava-soap-authentication-wrapper-code-sample-response-only-3-28" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # SOAP Authentication Wrapper Code Samples for Java: Response-Only The following code sample shows what you need to include in your webpage if you want to incorporate OneSpan Authentication Server Response-Only authentication. ```java <%@ page import="com.vasco.identikey.model.Credentials" %> <%@ page import="com.vasco.identikey.controller.authentication.AuthenticationCommandResponse" %> <% // 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) { %>

OTP Verification Succeeded

<% } %> ``` 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.