pub struct JsonWebKeyCache {
pub entries: HashMap<String, (Instant, JsonWebKey)>,
}Expand description
A cache for JSON web keys.
Fields§
§entries: HashMap<String, (Instant, JsonWebKey)>The entries in this cache.
Implementations§
Source§impl JsonWebKeyCache
impl JsonWebKeyCache
Sourcepub fn remove_stale_keys(&mut self)
pub fn remove_stale_keys(&mut self)
Remove any stale keys.
Sourcepub fn insert(&mut self, jwks: JsonWebKeySet)
pub fn insert(&mut self, jwks: JsonWebKeySet)
Insert a JSON web key set into the cache.
Sourcepub fn get(&self, kid: &str) -> Option<&JsonWebKey>
pub fn get(&self, kid: &str) -> Option<&JsonWebKey>
Get a key by ID.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsonWebKeyCache
impl RefUnwindSafe for JsonWebKeyCache
impl Send for JsonWebKeyCache
impl Sync for JsonWebKeyCache
impl Unpin for JsonWebKeyCache
impl UnwindSafe for JsonWebKeyCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more