Guides
Verify the JWT
Digital ID signs the verified-data JWT with EdDSA and Ed25519.
Complete these checks on the merchant backend:
- Get the public keys from
/.well-known/jwks.json. - Select the key that matches the JWT
kidheader. - Verify the EdDSA signature.
- Confirm that
audequals the merchant ID. - Confirm that
expis in the future. - Confirm that
issis the expected Privy issuer:https://digitalid.privy.id/.
The claims have this form:
Code
my_identity is present only with the Identity package. Decrypt it after
signature and claim verification.
Do not trust the claims before all required checks succeed.
Claim reference
| Claim | Type | Presence | Description |
|---|---|---|---|
iss | string | Always | Privy issuer: https://digitalid.privy.id/. Verify against this value. |
sub | string | Always | Identity reference for the verified user. |
aud | string | Always | The merchant ID. It must equal your merchant ID. |
session_id | string | Always | The verification session of this result. |
merchant | string | Always | Merchant reference. |
data.my_contact_data | object | Always | Plaintext contact claims: email and phone. |
data.my_identity | string | Identity package | Base64 RSA-4096 ciphertext of the identity JSON. |
verification.method | string | Always | Verification method. Treat this value as opaque, and use it only for audit records. |
iat | number | Always | Issue time, in Unix seconds. |
exp | number | Always | Expiry time, in Unix seconds. It must be in the future. |
If verification fails, reject the result and do not use its data. Get the JWKS again and repeat the checks. See the recovery guide.
Last modified on
