SOAP Signature Wrappers
  • 21 Jan 2025
  • 1 Minute à lire
  • Sombre
    Lumière
  • PDF

SOAP Signature Wrappers

  • Sombre
    Lumière
  • PDF

The content is currently unavailable in French. You are viewing the default English version.
Résumé de l’article

The SOAP signature wrapper maps all commands defined in the OneSpan Authentication Server signature WSDL file in a class called SignatureHandler.

For the signature object, the IdentikeyResponse class is extended to a SignatureResponse class. For a list of different methods defined by this class, see Overview of SOAP wrappers.

SOAP authentication wrapper code samples for .NET: Response-only

The following code sample shows what you need to include in your webpage if you want to incorporate OneSpan Authentication Server signature functionality.

If you want to include other functionality, go to the sdk_install_dir/ASP.Net/src/IdentikeyAuthSampleSite/authentication folder and use the code from the files in there. All the file names identify the function of the code in the file.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="signature.aspx.cs" Inherits="IdentikeySampleSite.authGroup.signature" %>
<asp:Content ID="Signature" ContentPlaceHolderID="MainContentHolder" runat="server">
<%
  String userID = Request["SIGNFLD_USERID"];
  String domain = Request["SIGNFLD_DOMAIN"];
  String signature = Request["SIGNFLD_SIGNATURE"];
  String[] fields = new String[8];
  fields[0] = Request["SIGNFLD_DATA_FIELD_1"];
  fields[1] = Request["SIGNFLD_DATA_FIELD_2"];
  fields[2] = Request["SIGNFLD_DATA_FIELD_3"];
  fields[3] = Request["SIGNFLD_DATA_FIELD_4"];
  fields[4] = Request["SIGNFLD_DATA_FIELD_5"];
  fields[5] = Request["SIGNFLD_DATA_FIELD_6"];
  fields[6] = Request["SIGNFLD_DATA_FIELD_7"];
  fields[7] = Request["SIGNFLD_DATA_FIELD_8"];
  Boolean rcc = (Boolean)"on".Equals(Request["SIGNFLD_REQUEST_CONFIRM_CODE"]);
  String deferredTime = Request["SIGNFLD_DEFERRED_DATETIME"];
  String deferredEvent = Request["SIGNFLD_DEFERRED_EVENT_VALUE"];

  // Execute the command
  results = executeSignature(domain, userID, signature, fields, deferredTime, deferredEvent, rcc);

  if (results.getReturnCode() == 0)
  {
%>
    <p>Signature verification succeeded</p>
<%
  }
%>
</asp:Content>

This code comes from the signature.asp.cx file.

using IdentikeyWrapper.vasco.identikey.model;
using IdentikeyWrapper.vasco.identikey.signature;
namespace IdentikeySampleSite.authGroup
{
  public partial class signature : System.Web.UI.Page
  {
    protected SignatureCommandResponse results;
    protected SignatureCommandResponse executeSignature(String domain, String userID, String signature, String[] fields, String deferredTime, String deferredEvent, Boolean reqConfCode)
    {
      SignatureHandler handler = new SignatureHandler();
      List<String> datafields = new List<String>();
      foreach(String s in fields) datafields.Add(s);
      DateTime? dt = null;
      try {
        String[] format = { "dd/MM/yyyy HH:mm:ss" };
        dt = DateTime.ParseExact(deferredTime, format, null, DateTimeStyles.None);
      } catch (Exception) { }
      UInt32? de = null;
      try {
        de = Convert.ToUInt32(deferredEvent);
      } catch (Exception) { }
      Signature.RequestConfirmationCode rcc = reqConfCode ? Signature.RequestConfirmationCode.Required : Signature.RequestConfirmationCode.Optional;
      return handler.authSignature(domain, userID, signature, datafields, dt, de, rcc);
    }
  }
}

Cet article vous a-t-il été utile ?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, facilitant la découverte de connaissances grâce à l’intelligence conversationnelle