SDKs and packages
The SDKs are open source (Apache-2.0) at github.com/Yumankind/prson-sdk. The Verifications API needs no SDK: it is plain HTTPS and JSON.
Packages
terminal
npm install @prson/login-sdk @prson/login-sdk-ui @prson/login-verifier| Package | Runs in | What it does |
|---|---|---|
@prson/login-sdk | Browser | Sign in with Prson: the code, the encrypted channel, the live session. |
@prson/login-sdk-ui | Browser | The Sign in with Prson button and the sign-in dialog. |
@prson/login-verifier | Node 18+ | Check sign-ins, signed facts, unique-person ids and verification verdicts; send notifications. |
@prson/login-cli | Node | Sign in to a command-line program with a code in the terminal. |
@prson/login-verifier
verifyPresentation(presentation, { expectedAudience, expectedNonce }) | A Sign in with Prson credential. |
verifyUniqueHumanId(credential, { expectedAudience }) | A one-account-per-person id. |
verifySignedFragment(fragment, opts) / verifyFragmentCredential(jwt, opts) | A fact Prson signed (native, vc+jwt or vc+sd-jwt). |
verifyVerdict(envelope, signature, disclosures, { keys }) | A verification answer's signature and what it disclosed. |
checkCredentialStatus(payload, opts) | Whether a credential was revoked (verifyPresentation already does it). |
readNotifyHandle(value) / sendNotification({ apiKey, handle, title, body }) | Website notifications. |
How they fit together: Sign in with Prson and checking a verdict.
Browser bundles
No build step? Load the same SDK from prson.net. The files are built from the source above and checked in CI.
index.html
<script type="module">
import "https://prson.net/vendor/prson-login/prson-login-ui.js";
import { PrsonLogin } from "https://prson.net/vendor/prson-login/prson-login.js";
</script>OpenAPI
The API's OpenAPI 3.1 file is at api.prson.net/v1/openapi.json: generate a client in any language. What a verification can ask for is also served live, without a key, at GET https://api.prson.net/v1/verifications/requirements.
Source and security
- Issues and changes: github.com/Yumankind/prson-sdk/issues.
- Security reports: [email protected].
- Prson's signing keys: did:web:app.prson.net and
GET https://api.prson.net/v1/company/public-key.