Get a signing key
GEThttps://api.dilisense.com/v1/keys/{kid}
The keys API method returns the public key for a key ID as a JSON Web Key.
Key rotation. The signing key is rotated regularly, every key is used for signing for a limited period and is then retired. Keys stay retrievable by their ID after their retirement, so that you can verify a stored body at any later point in time. Follow these rules in your implementation:
- Look up the key by the
kidof the signature header, never rely oncurrentfor verification. The current key can change between the moment a body is signed and the moment you fetch the key. - Do not hardcode a key. Fetch a key the first time you see its ID and cache it by ID. The key material of a key document never changes, only its
statusdoes, so refresh cached keys from time to time to notice a revocation. - Accept the statuses ACTIVE and RETIRED, reject REVOKED.
Request
Example request
curl --location --request GET 'https://api.dilisense.com/v1/keys/current' \
--header 'x-api-key: <api_key>'
Responses
- 200
- 404
OK
No key with this kid exists.
Error responses are the same for all endpoints, see Errors.