Skip to content

About

Sample apps for Lacuna PKI Suite: PAdES, CAdES and XAdES signatures, validation, timestamps, certificate login and issuance with Rest PKI Core, PKI SDK, PKI Express, Web PKI and Amplia, in .NET, Java, Node.js, PHP, Python and Ruby.

Topics

Resources

Stars

39 stars

Watchers

15 watching

Forks

Repository files navigation

PKI Suite samples

This repository contains sample projects demonstrating the usage of Lacuna Software's PKI Suite in various programming languages and frameworks.

To get started, choose a programming language:

Find a sample by task

SAMPLES.md lists every sample grouped by task (sign a PDF, validate a signature, authenticate with a certificate, issue a certificate, and so on), with one column per language and links straight to the code. The same data is in samples.json for tools and scripts. Each project folder also has a README that lists its own samples.

Every sample has a status:

Status Meaning
current Recommended for new integrations.
legacy Works and is still supported, but prefer the current alternative for new code.
deprecated Kept for reference only. Do not copy into new code.

Using this repo with an AI coding agent

If you work with Claude Code, Cursor, GitHub Copilot, Codex or a similar agent, point it at this repository. AGENTS.md (which CLAUDE.md imports) tells the agent:

  • how the repository is organized, and to look the task up in samples.json first
  • which product to prefer for a task
  • the integration patterns that matter, for example that the private key never leaves the user's machine because Web PKI signs only the hash

See also

For Devs

Running the update-licenses.ps1 Script

To update API keys and license files across the repository, follow these steps:

  1. Open a PowerShell terminal in the repository root.
  2. Run the script by executing:
    ./update-licenses.ps1
  3. Follow the prompts to enter your REST PKI API Key, REST PKI Core API Key, Amplia API Key, and the expiry date (format: DD/MM/YYYY).
  4. Paste the new LacunaPkiLicense.config XML content when prompted.
  5. The script will update all relevant files and report the number of files modified.

What the Script Modifies

The update-licenses.ps1 script performs the following changes:

  • dotnet/mvc/PkiSuiteAspNetMvcSample/Web.config:
    • Updates RestPkiAccessToken (value for key "RestPkiAccessToken" with the RestPkiApiKey)
    • Updates RestPkiCoreApiKey (value for key "RestPkiCoreApiKey")
    • The CloudHubApiKey is intentionally skipped.
    • Updates expiry date comments.
  • dotnet/spa/PkiSuiteAspNetCoreAngularSample/PkiSuiteAspNetCoreAngularSample.Server/appsettings.json:
    • Updates RestPkiCore.ApiKey (with the RestPkiCoreApiKey)
    • Updates the expiry date comment.
    • The project has no Rest PKI or Amplia keys. Its PKI SDK license is the LacunaPkiLicense.config next to appsettings.json (see below).
  • java/springmvc/src/main/resources/application.yml:
    • Sets rest-pki.accessToken (with the RestPkiApiKey)
    • Sets rest-pki-core.apiKey (with the RestPkiCoreApiKey)
    • Sets amplia.apiKey (with the AmpliaApiKey)
    • Embeds expiry date comments in the new content.
    • The cloudhub.apiKey is intentionally preserved with its existing value from the template.
  • nodejs/expressmvc/config/default.js:
    • Updates restPki.accessToken (with the RestPkiApiKey)
    • Updates amplia.apiKey (with the AmpliaApiKey)
    • Sets rest-pki-core.apiKey (with the RestPkiCoreApiKey)
    • Updates expiry date comments.
    • The cloudhub.apiKey is intentionally skipped.
  • php/plain/config.php:
    • Updates 'restPki' => 'accessToken' (with the RestPkiApiKey)
    • Updates 'restPkiNg' => 'apiKey' (with the RestPkiCoreApiKey)
    • Updates 'amplia' => 'apiKey' (with the AmpliaApiKey)
    • Updates expiry date comments.
    • The cloudHub section is intentionally not modified.
  • python/flask/sample/config.py:
    • Updates REST_PKI_ACCESS_TOKEN (with the RestPkiApiKey)
    • Updates REST_PKI_CORE_API_KEY (with the RestPkiCoreApiKey)
    • Updates AMPLIA_API_KEY (with the AmpliaApiKey)
    • Updates expiry date comments.
    • The CLOUDHUB_API_KEY is intentionally not modified.
  • ruby/rails/config/lacuna.yml:
    • Updates rest_pki.api_key (with the RestPkiApiKey)
    • Updates rest_pki_core.api_key (with the RestPkiCoreApiKey)
    • Updates expiry date comments.
  • LacunaPkiLicense.config (all instances found in the repository, except dotnet/mvc/PkiSuiteAspNetMvcSample/bin/LacunaPkiLicense.config):
    • The entire XML content is replaced with the new license content provided by the user.

If you have inserted a new key which requires updating in any of the documents listed above, please make the appropriate changes in the script and also add the changes to this section of this README.

About

Sample apps for Lacuna PKI Suite: PAdES, CAdES and XAdES signatures, validation, timestamps, certificate login and issuance with Rest PKI Core, PKI SDK, PKI Express, Web PKI and Amplia, in .NET, Java, Node.js, PHP, Python and Ruby.

Topics

Resources

Stars

39 stars

Watchers

15 watching

Forks

Releases

Packages

Used by

Contributors

Languages