Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The PadConnector assumes that requests over the web socket are JSON objects.
The requests contain a "messageId" field.
The requests contain a "type" field.
The requests may contain a "data" field whose structure varies for different message types.

Replies are JSON objects.
Replies may contain a "messageId" field.
Replies may contain a "data" field.
The messageId may be a field of the "data" field.

Lazy replies are replies that may be sent in the future.
Lazy replies contain a "type" field.
Lazy replies contain a "data" field that has a "messageId" field and a sequence of fields with keys "valueEl PadConnector asume que las peticiones a través del socket web son objetos JSON. .
Las peticiones contienen un campo "messageId".
Las peticiones contienen un campo "type".
Las peticiones pueden contener un campo "data" cuya estructura varía para los diferentes tipos de mensajes..

Las respuestas son objetos JSON.
Las respuestas pueden contener un campo "messageId"..
Las respuestas pueden contener un campo "data”.
El messageId puede ser un campo del campo "data”.

Las respuestas estáticas son respuestas que pueden enviarse en el futuro.
Las respuestas estáticas contienen un campo "type”.
Las respuestas estáticas contienen un campo «data» que tiene un campo «messageId» y una secuencia de campos con claves «value[0-9]+».".

...

Tipos

Table of Contents
minLevel3
maxLevel3

Requests, replies, lazy replies.

executeDeviceSearch

searches devices and selects one of them.

The reply contains "data" with "ret" with a one(1) in case of success.

finishSigning

ends a running signature capture in a similar way as the OK click on the device.
This should lead to a lazy "onStaticAppletSignatureFinished" reply.

getBioData

gets biodata.

The reply contains "data" that contains a "ret" field with the biodata as a base64-encoded sequence of naturaSignV2 records.

getButtonConfigs

gets the current button configuration of the signature pad. Since v2.2.0

...

Code Block
{"data":{"messageId":"ceec4053-a1f3-4a6f-996d-a4b3e975cd83"},"type":"getButtonConfigs"}

{"data":{"ret":[
{"mode":"Signature", "visible":true, "color":-16776961, "kind":"Rotate", "enabled":true}, 
{"mode":"Signature", "visible":false, "color":-16776961, "kind":"Rotate90", "enabled":false}, 
{"mode":"Signature", "visible":false, "color":-16711936, "kind":"Next", "enabled":false}, 
{"mode":"Signature", "visible":false, "color":-16711936, "kind":"Prev", "enabled":false}, 
{"mode":"Signature", "visible":true, "color":-16711936, "kind":"Ok", "enabled":true}, 
{"mode":"Signature", "visible":true, "color":-8372224, "kind":"Repeat", "enabled":true}, 
{"mode":"Signature", "visible":true, "color":-16711936, "kind":"Cancel", "enabled":true}, 
{"mode":"DocView", "visible":true, "color":-16776961, "kind":"Rotate", "enabled":true}, 
{"mode":"DocView", "visible":true, "color":-16776961, "kind":"Rotate90", "enabled":true}, 
{"mode":"DocView", "visible":true, "color":-65536, "kind":"Next", "enabled":true}, 
{"mode":"DocView", "visible":true, "color":-16776961, "kind":"Prev", "enabled":false}, 
{"mode":"DocView", "visible":true, "color":-16776961, "kind":"ZoomIn", "enabled":true}, 
{"mode":"DocView", "visible":true, "color":-16776961, "kind":"ZoomOut", "enabled":true}, 
{"mode":"DocView", "visible":true, "color":-65536, "kind":"StartSignature", "enabled":true}, 
{"mode":"DocSign", "visible":true, "color":-16776961, "kind":"Rotate", "enabled":true}, 
{"mode":"DocSign", "visible":false, "color":-16776961, "kind":"Rotate90", "enabled":false}, 
{"mode":"DocSign", "visible":true, "color":-14336, "kind":"Next", "enabled":true}, 
{"mode":"DocSign", "visible":true, "color":-16725761, "kind":"Prev", "enabled":true}, 
{"mode":"DocSign", "visible":true, "color":-16740298, "kind":"Ok", "enabled":true}, 
{"mode":"DocSign", "visible":true, "color":-996296, "kind":"Repeat", "enabled":true}, 
{"mode":"DocSign", "visible":true, "color":-1966054, "kind":"Cancel", "enabled":true}]}, 
"messageId":"ceec4053-a1f3-4a6f-996d-a4b3e975cd83","type":"response"}

getButtonEvents

observes the button clicks on the pad. Since v2.2.0

...

Code Block
{"data":{"messageId":"13dad597-d82c-44ac-9f6d-0906ce95f775"},"type":"getButtonEvents"}{ "data":{"ret":{"kind":"StartSignature"}}," messageId":"13dad597-d82c-44ac-9f6d-0906ce95f775","type":"response" }

getDevice

gets the name of the selected device

The reply contains "data" with "ret" with the name.

getDeviceCertificate

gets a certificate which is necessary to verify the last signature.

The reply contains "data" with "ret" with a base64 encoded DER encoded X.509 certificate.

getDeviceCount

gets the number of attached signature devices

reply contains "data" with "ret" with the number of devices.

getDeviceInfo

gets information on the selected device.

...

Code Block
deviceType=duraSign 10.0,
serial=123456000,
openState=3,
cryptoIdInfo=<?xml version="1.0" encoding="UTF-8"?><CryptoIDInfoList xmlns="http://www.stepover.com/CryptoIDContaineInfoXMLSchema">
	<CryptoIDInfo><id>0</id><description>StepOver cryptoIdv1</description><padCertLength>256</padCertLength><padNotaryLength>256</padNotaryLength></CryptoIDInfo>
	<CryptoIDInfo><id>1</id><description>StepOver cryptoIdv2</description><padCertLength>512</padCertLength><padNotaryLength>256</padNotaryLength></CryptoIDInfo>
	<CryptoIDInfo><id>2</id><description>StepOver cryptoIdv2</description><padCertLength>512</padCertLength><padNotaryLength>512</padNotaryLength></CryptoIDInfo>
</CryptoIDInfoList>,
cryptoIdInfoJson=[
	{"padCertLength":256,"description":"StepOver cryptoIdv1","padNotaryLength":256},
	{"padCertLength":512,"description":"StepOver cryptoIdv2","padNotaryLength":256},
	{"padCertLength":512,"description":"StepOver cryptoIdv2","padNotaryLength":512}
],
firmwareVersion=7.9.0.354,
deviceTime=1644853028000

getDeviceOpened

gets whether the device has been opened.

The reply contains "data" with "ret" with "true" or "false".

getDeviceSerial

Replies "data" that contains a "ret" with the device serial number

getEncryptedAesKey

gets a key that is necessary for decrypting the bioData captured during in the last signature process.

request

"data" contains a "darray" field which is a JSON array of numbers each being an octet of the preliminary document hash

reply

"data" that contains a "ret" field with the base64-encoded encrypted AES key

getNotaryInfo

Replies "data" that contains a "ret" with the notary info.

getPreliminaryData

gets preliminary data including the last signature image.

request

"data" that contains

  • "withAlpha", whether to use an alpha channel for transparency,

  • "width" the desired width of the image,

  • "height" the desired height of the image.

reply

contains "data" with "ret" which contains an array with these items

  • the bio data,

  • the certificate necessary to verify the signature as baset64 text,

  • the last signature image as base64 text,

  • the notary information as base64 text,

  • the device name,

  • the device serial number.

getSignatureImage

gets the signature image in one of two ways.

...

  • "withAlpha", whether to use an alpha channel for transparency, (true or false),

  • "width" the desired width,

  • "height" the desired height.

getSignedFinalDocHash

is obsolete.

getVersion

gets the version of the PadConnector.

The reply contains "data" with "ret" with the version.

keepAlive

Replies "data" that contains a "ret" with the text "ok".

onStaticAppletGetImage

is a lazy reply of

...

Code Block
{
"data":{
 	"value0":1,
	"value1":2,
	"messageId":"6d1a23df-5919-4d75-9446-4a6d95f4ed7a"
},
"type":"onStaticAppletGetImage"
}

setButtonConfigs

sets the button configuation. Since v2.2.0.

...

Code Block
{"data":{
"buttonConfigs":[{"mode":"DocView","visible":true,"color":-16711936,"kind":"StartSignature","enabled":true}],
"messageId":"3af72aa7-7d90-4f52-a159-edf4cafbb599"},
"type":"setButtonConfigs"}}
{"data":{"ret":"ok"},"messageId":"3af72aa7-7d90-4f52-a159-edf4cafbb599","type":"response"}

setFinalDocHash

sets the final document hash to be signed.

request

"data" contains a "darray" field which is a JSON array of numbers each being an octet of the final document hash

reply

"data" contains a "ret" with the text "ok".

lazy reply

"type" is "onStaticAppletSignedFinalDocHash" contains "data" with "value0" field
that is a JSON array of numbers each being an octet of an RSA signature.

start

resets state and replies ok.

The lazy reply "onStaticAppletLoaded" is sent when the operation completed.

startSigning

starts a signing process.

request

"data" should contain

  • "page", the page of the signature field,

  • "x", "y", "width", "height", the position of the signature field in inch/72
    where

    • "y" is the upper border from top

    • "x" is the left border from left

  • "resolution" tells with how many dots per inch the page will be rendered
    and sent as a reply to "onStaticAppletGetImage".

...

  • the "cryptoId" to use with the selected pad

  • "signatureImageIntervalMillis" to change the interval of the image stream,

  • "signMode" which can be

    • "inDoc"

    • "standard",

  • "afterSignMode" which can be

    • "noModeChange",

    • "documentViewing",

    • "customerLogo"

  • "textLines" that contains a sequence of key value pairs,
    the keys being [0-9]+, the values being lines of text to be displayed on the pad;

  • "buttonConfigs", since v2.2.0, an array of button configs, to change the buttons.

reply

"data" contains a "ret" with the text "ok".

Lazy replies

"onStaticAppletCaptureStarted", is sent when the signer starts to sign.

...

"onStaticAppletError" is sent in case of error. If the pad has been disconnected, it contains "data" with "value0" "DISCONNECT".

Remarks

With color pads, this uses the sign-in-document mode, if

...

If "config" was absent, the PC switches the pad to the customerLogo mode.

startViewing

starts a document viewing process. Supported devices can display document pages.

request

"data" may contain

  • "pages" with a number being the number of pages.

  • "buttonConfigs", since v2.2.0, an array of button configs, to change the buttons.

reply

"Ok".

lazy reply

"onStaticAppletGetImage" is sent when the PadConnector requires an image.

stopSigning

stops a signing process.

"data" may contain "showManufacturerLogo", a boolean that tells whether the pad should switch to manufacturer logo mode, also known as customer logo mode, also known as standby mode.