DarrenBaldwin07 / clerk-rs

A official community-maintained Clerk SDK for Rust
https://crates.io/crates/clerk-rs
MIT License
76 stars 24 forks source link

Cache JWKS #45

Open hazelmeow opened 4 months ago

hazelmeow commented 4 months ago

When authorizing requests, instead of getting the JWKS from Clerk on every request, there should be some mechanism to cache the JWKS. clerk-rs could provide some common options (cached in memory, refresh on unknown kid, refresh periodically) and reasonable defaults and a trait to allow custom implementations.