Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

El 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

Peticiones, respuestas, respuestas estáticas.

executeDeviceSearch

busca dispositivos y selecciona uno de ellos.

La respuesta contiene"data" con "ret" con un uno (1) en caso de que la respuesta sea afirmativa.

finishSigning

finaliza una captura de firma en ejecución de forma similar al clic de OK en el dispositivo.
Esto debería dar lugar a una respuesta estática «onStaticAppletSignatureFinished».

getBioData

obtiene biodatos.

La respuesta contiene «data» que contiene un campo «ret» con los biodatos como una secuencia codificada en base64 de registros naturaSignV2.

getButtonConfigs

obtiene la configuración actual de los botones de la tableta de firma. Desde v2.2.0

La respuesta contiene «data» con «ret» con un conjunto de configuraciones de botones.
Un elemento de esa matriz, una sola configuración de botón, tiene los campos

  • mode being one of Signature or DocView or DocSign

  • kind being one of Ok, Repeat, Cancel, Rotate, Rotate90, Prev, Next, ZoomIn, ZoomOut, StartSignature

  • visible, boolean

  • enabled, boolean

  • color which is a 32bit ARGB value.

  • el modo puede ser Firma, DocView o DocSign

  • siendo uno de: Ok, Repeat, Cancel, Rotate, Rotate90, Prev, Next, ZoomIn, ZoomOut, StartSignature

  • visible, booleano

  • enabled, booleano

  • color, que es un valor Valor ARGB de 32 bits.

{"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

observa las pulsaciones de botón en Tableta de firma. Desde la v2.2.0

Las respuestas estáticas contienen «data» que contiene «ret» que contiene el «kind» del botón que se ha pulsado.

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

getDevice

obtiene el nombre del dispositivo seleccionado

La respuesta contiene "data" con "ret" con el nombre.

getDeviceCertificate

obtiene un certificado necesario para verificar la última firma.

La respuesta contiene "data" con "ret" con un certificado X.509 codificado DER en base64.

getDeviceCount

obtiene el número de dispositivos de firma conectados

reply contiene "data" con "ret" con el número de dispositivos.

getDeviceInfo

obtiene información sobre el dispositivo seleccionado.

La respuesta contiene "data" con "ret" con

  • "serial», el número de serie,

  • «deviceType», el tipo de dispositivo,

  • «firmwareVersion», la versión del firmware,

  • «openState», el estado abierto, debe ser cero(0),

  • «deviceTime», el tiempo en milisegundos desde 1970,

  • «cryptoIdInfo», un texto XML que contiene información sobre las claves criptográficas almacenadas en el dispositivo.

  • «cryptoIdInfoJson», contiene información similar a “cryptoIdInfo” en forma de matriz JSON. Desde v2.1.0.

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.

If startSigning has been called with the "config" map,
this responds a stream of images that ends when the signature ends.

Else, it sends a single image.

"data" may contain

  • "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

It either is a signal (1) or a request for an image (2).
How to react to the signal depends on the application.

"data" contains

  • value0, the one-based page number

  • value1, is either one (1) or two (2)

In case of an image request as a consequence of a startSigning request,
render the page with the resolution used in that request
and send it as part of the reply to the PadConnector.
Note that zero-based page numbers are used in the startSigning request.

Example

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

setButtonConfigs

sets the button configuation. Since v2.2.0.

The request contains "data" that contains "buttonConfigs" which is an array of button configs, to change the buttons.

Replies "ok".

{"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".

"data" may contain

  • "withHashDialog" to change whether to sign the final doc hash with the hash dialog on the pad,

  • "signatureTimeout" to change the signature timeout in ms, the special value zero(0) means infinite.

"data" may contain "config" that may contain

  • 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.

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

"onStaticAppletSignatureRepeat" is sent when the signature shall be repeated.

"onStaticAppletSignatureFinished" when the signature is finished either by

  • a "finishSigning" message by the client, or

  • an "OK" click on the signature pad, or

  • a timeout after the signer has stopped drawing.

"onStaticAppletSignatureCancel" is sent when the signature has been canceled by a click on the Cancel button on the pad.

"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

  • the "config" field is not used and "startViewing" has been called before or

  • the "config" field is used with "signMode" being "inDoc".

The standard sign mode will be used, if "start" or "stopSigning" have been called before.

Before answering the "setFinalDocHash" request with the lazy "onStaticAppletSignedFinalDocHash" reply,
the PC may switch the pad to another mode an "afteSignMode" was given.

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.

  • No labels