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:
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. |
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
To update API keys and license files across the repository, follow these steps:
- Open a PowerShell terminal in the repository root.
- Run the script by executing:
./update-licenses.ps1
- 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).
- Paste the new LacunaPkiLicense.config XML content when prompted.
- The script will update all relevant files and report the number of files modified.
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
CloudHubApiKeyis intentionally skipped. - Updates expiry date comments.
- Updates
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.confignext toappsettings.json(see below).
- Updates
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.apiKeyis intentionally preserved with its existing value from the template.
- Sets
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.apiKeyis intentionally skipped.
- Updates
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
cloudHubsection is intentionally not modified.
- Updates
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_KEYis intentionally not modified.
- Updates
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.
- Updates
LacunaPkiLicense.config(all instances found in the repository, exceptdotnet/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.