genRequest (Command)

Prev Next

Availability: OneSpan Authentication Server 3.7 and later

Scenario: Signature

Support:  full-sdk   auth-sdk 

The genRequest command requests OneSpan Authentication Server to generate a request message, which can be used to initiate a signature validation transaction using Secure Channel.

You can define the transaction data fields either with the SIGNFLD_REQUEST_BODY attribute or with a data field list and the SIGNFLD_TRANSACTION_TITLE attribute. If you decide to use a data field list, you need to define keys and values for each data field and add them to the dataFieldList element.

Parameters

  Table:  genRequest input parameters 
Parameter name Data type Description
attributeSet SignatureAttributeSet Required. A set containing zero or more attribute fields. See Table: genRequest (Supported input attributes).
dataFieldList DataFieldList Optional. A list of key/value pairs to specify the transaction data fields to sign (see  DataFieldList (Data type)).


  Table:  genRequest output parameters
Parameter name Data type Description
results SignatureResults Required. Result structure containing return and status codes and a list of zero or more result attribute fields. See Table: genRequest (Supported output attributes).

DataFieldList (Data type)

  Table:  DataFieldList (Data type)
Element name Data type Description
dataField DataField Optional. A key/value pair to specify a data field to sign (see DataField (Data type)).

DataField (Data type)

  Table:  DataField (Data type)
Element name Data type Description
key String Required. The key of the data field.
value String Required. The value of the data field.

The following attributes can be specified in the attributeSet input parameter of this command:

  Table:  genRequest (Supported input attributes)
Attribute name Optionality
SIGNFLD_AUTH_TYPE

Optional

Used to trigger a scan and sign workflow.

SIGNFLD_COMPONENT_TYPE

Mandatory

SIGNFLD_CRYPTO_APP_INDEX

Optional

This field cannot be used in combination with SIGNFLD_CRYPTO_APP_NAME.

SIGNFLD_CRYPTO_APP_NAME

Optional

This field cannot be used in combination with SIGNFLD_CRYPTO_APP_INDEX.

SIGNFLD_DOMAIN

Optional

SIGNFLD_REQUEST_BODY

Optional

This field cannot be used in combination with SIGNFLD_TRANSACTION_TITLE and a data field list.

SIGNFLD_SERIAL_NO

Optional

SIGNFLD_TRANSACTION_TITLE

Optional

This field cannot be used in combination with SIGNFLD_REQUEST_BODY.

SIGNFLD_USERID

Mandatory

The following attributes will be specified in the results output parameter of this command:

  Table:  genRequest (Supported output attributes)

Attribute Name

Returned

SIGNFLD_DOMAIN

Always

SIGNFLD_ORGANIZATIONAL_UNIT

If defined
SIGNFLD_REQUEST_KEY Always
SIGNFLD_REQUEST_MESSAGE Always

SIGNFLD_SERIAL_NO

Always

SIGNFLD_USERID

Always

For more information about the specific attributes, see Table: SOAP signature field attributes.

Examples

Generate a request by specifying the transaction data fields with the SIGNFLD_REQUEST_BODY attribute:

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <sig:genRequest xmlns:sig="http://www.vasco.com/IdentikeyServer/IdentikeyTypes/Signature" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <attributeSet>
        <attributes>
          <value xsi:type="xsd:string">jane.doe</value>
          <attributeID>SIGNFLD_USERID</attributeID>
        </attributes>
        <attributes>
          <value xsi:type="xsd:string">SOAP Signature Client</value>
          <attributeID>SIGNFLD_COMPONENT_TYPE</attributeID>
        </attributes>
        <attributes>
          <value xsi:type="xsd:string">001081F4DCF4B9F4DCF4BCF4...</value>
          <attributeID>SIGNFLD_REQUEST_BODY</attributeID>
        </attributes>
      </attributeSet>
    </sig:genRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Generate a request by specifying the transaction data fields with the dataFieldList element:

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <sig:genRequest xmlns:sig="http://www.vasco.com/IdentikeyServer/IdentikeyTypes/Signature" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <attributeSet>
        <attributes>
          <value xsi:type="xsd:string">jane.doe</value>
          <attributeID>SIGNFLD_USERID</attributeID>
        </attributes>
        <attributes>
          <value xsi:type="xsd:string">SOAP Signature Client</value>
          <attributeID>SIGNFLD_COMPONENT_TYPE</attributeID>
        </attributes>
        <attributes>
          <value xsi:type="xsd:string">My transaction</value>
          <attributeID>SIGNFLD_TRANSACTION_TITLE</attributeID>
        </attributes>
      </attributeSet>
      <dataFieldList>
        <dataField>
          <key>key1</key>
          <value>value1</value>
        </dataField>
        <dataField>
          <key>key2</key>
          <value>value2</value>
        </dataField>
      </dataFieldList>
    </sig:genRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Scan and sign

This is an example for the first genRequest request in a scan and sign workflow.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <sig:genRequest xmlns:sig="http://www.vasco.com/IdentikeyServer/IdentikeyTypes/Signature" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <attributeSet>
        <attributes>
          <value xsi:type="xsd:string">user</value>
          <attributeID>SIGNFLD_USERID</attributeID>
        </attributes>
        <attributes>
          <value xsi:type="xsd:string">Client</value>
          <attributeID>SIGNFLD_COMPONENT_TYPE</attributeID>
        </attributes>
        <attributes>
          <value xsi:type="xsd:string">Transaction/value>
          <attributeID>SIGNFLD_TRANSACTION_TITLE</attributeID>
        </attributes>
        <attributes>
          <value xsi:type="xsd:string">SCAN</value>
          <attributeID>SIGNFLD_AUTH_TYPE</attributeID>
        </attributes>
      </attributeSet>
      <dataFieldList>
        <dataField>
          <key>A</key>
          <value>valueA</value>
        </dataField>
        <dataField>
          <key>B</key>
          <value>valueB</value>
        </dataField>
        ...
      </dataFieldList>
    </sig:genRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>