mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 05:13:01 +03:00
[PR #339] feat: store keys as JWK on disk #870
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/pocket-id/pocket-id/pull/339
State: closed
Merged: Yes
Part of #322
This converts the format of keys stored on disk to JWK and it allows reading keys containing RSA, ECDSA, or EdDSA keys (note: while non-RSA keys can be read, at this stage I don't believe they can be used to sign/verify JWTs... that will be a subsequent PR)
If a PEM-encoded key is found on disk, it is converted to JWK upon startup.
Lastly, completes a perf improvement started with #327: the JWKS endpoint now returns data that is always cached, making it significantly faster (and reducing the amount of heap allocations on every invocation)