Pular para o conteúdo principal

Node.js MVC samples project

The Node.js MVC samples project shows how to use Rest PKI together with Web PKI on a Node.js project following the Model-View-Controller pattern. It is hosted on GitHub at:

https://github.com/LacunaSoftware/PkiSuiteSamples/tree/master/nodejs/expressmvc

Running the project​

  1. Download the project or clone the repository
  2. Install dependencies: npm install
  3. Run application: npm start
  4. Access the URL http://localhost:3000

Project map​

This section lists where to find the relevant parts in each feature sample on the project.

Authentication with digital certificate​

PAdES signature with file already on server​

PAdES signature with file uploaded by user​

After the file upload (which is crudely implemented merely for demonstration purposes on the route server-files.js and view server-files/index.pug) is done the control flow is the same as in the sample PAdES signature with file already on server, but with the URL parameter userfile filled.

PAdES co-signature​

After the control flow of the sample PAdES signature with file already on server is completed and the link Co-sign with another certificate is clicked, the same control flow is repeated, but now with the URL parameter userfile filled.

PAdES marks​

Not yet available on this project.

PAdES signature using server key​

PAdES signature without client communication​

Not yet available on this project.

Open/validate an existing PAdES signature​

Printer-friendly version​

After the control flow of the sample PAdES signature with file already on server is completed and the link Download a printer-friendly version of the signed file is clicked, the flow goes to the route printer-version-pades-restpki.js with the URL parameter file filled.

CAdES signature with file already on server​

CAdES signature with file uploaded by user​

After the file upload (which is crudely implemented merely for demonstration purposes on the route server-files.js and view server-files/index.pug) is done the control flow is the same as in the sample CAdES signature with file already on server, but with the URL parameter userfile filled.

CAdES co-signature​

After the control flow of the sample CAdES signature with file already on server is completed and the link Co-sign with another certificate is clicked, the same control flow is repeated, but now with the URL parameter cmsfile filled.

CAdES signature using server key​

Open/validate an existing CAdES signature​

XML signature of the entire document​

XML signature of an element​

XAdES signature of an element​

Not yet available on this project.

Open/validate signatures on an existing XML file​

Not yet available on this project.

Batch of PAdES signatures​

Not yet available on this project.

Optimized batch of PAdES signatures​

Not yet available on this project.

Batch of CAdES signatures​

Not yet available on this project.

Batch of XML signatures of elements on the same document​

Not yet available on this project.