NemLog-In Signing Service

A stateless signing adapter for NemLog-In digital signatures. Receives PDF references, presents the signing iframe, and redirects back after signing.

Test mode enabled: You can upload and sign a PDF directly to verify the NemLog-In integration.

Signing Flow

  1. Get correlation IDGET /sign?action=getcid to verify the service is running.
  2. Initiate signingGET /sign?action=sign with the PDF URI, forward URL, and hash. The service fetches the PDF and presents the NemLog-In signing iframe.
  3. Signing completes — NemLog-In posts the result to POST /signing-result (handled internally).
  4. Redirect back — The user is redirected via GET /sign?action=result (or action=cancel) to the original forward URL with the signed filename.
  5. Download signed PDFGET /sign?action=download to retrieve the signed document.

API Endpoints

GET /sign?action=getcid

Health check. Returns a unique correlation ID to confirm the service is running.

Example

curl https://sign.example.com/sign?action=getcid

Response

{"cid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"}
GET /sign?action=sign

Initiate document signing. Fetches the PDF, generates a signing payload, and renders the NemLog-In signing iframe.

Parameters

NameTypeDescription
uristringBase64-encoded URL of the PDF to sign.
forward_urlstringBase64-encoded URL to redirect to after signing.
hashstringSHA-1 HMAC: sha1(salt + forward_url) for request validation.

Example

curl "https://sign.example.com/sign?action=sign&uri=BASE64_PDF_URL&forward_url=BASE64_CALLBACK&hash=SHA1_HASH"

Response

HTML page with the NemLog-In signing iframe (not a JSON response).

GET /sign?action=result

Called after signing completes. Redirects (302) to the forward URL stored in the session, appending the filename and action.

Parameters

NameTypeDescription
filestringSigned document filename (32-char hex + .pdf).

Response

HTTP/1.1 302 Found
Location: https://forms.example.com/callback?file=abc123...def.pdf&action=result
action=cancel works identically but appends &action=cancel to the redirect URL.
GET /sign?action=download

Download the signed PDF. By default the file is deleted from the server after download.

Parameters

NameTypeDescription
filestringSigned document filename (must match ^[a-z0-9]{32}\.pdf$).
leavestring0 = delete after download (default), 1 = keep file on server.

Example

curl -O "https://sign.example.com/sign?action=download&file=abc123...def.pdf&leave=0"

Response

Binary PDF stream with Content-Type: application/pdf.

POST /signing-result

Internal callback from the NemLog-In signing iframe. Not called directly by API consumers.

Parameters (form POST)

NameTypeDescription
typestringsignedDocument, errorResponse, or cancelSign.
resultstringSigned document content or error details from NemLog-In.
namestringDocument filename.
formatstringSignature format (e.g. PAdES).
correlationIdstringCorrelation ID for tracing.

Error Responses

All errors are returned as JSON with HTTP 200:

{
  "error": true,
  "message": "Description of what went wrong",
  "code": 0
}

Security