pub struct InMemoryJtiCache { /* private fields */ }Expand description
In-memory JTI cache backed by moka.
Uses moka’s time-to-live (TTL) to automatically evict entries after tokens expire, preventing unbounded growth.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryJtiCache
impl Default for InMemoryJtiCache
Source§impl JtiCache for InMemoryJtiCache
impl JtiCache for InMemoryJtiCache
Source§fn check_and_store<'life0, 'life1, 'async_trait>(
&'life0 self,
jti: &'life1 str,
_expires_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<bool, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_and_store<'life0, 'life1, 'async_trait>(
&'life0 self,
jti: &'life1 str,
_expires_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<bool, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a JTI has been seen before, and store it if not. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryJtiCache
impl !UnwindSafe for InMemoryJtiCache
impl Freeze for InMemoryJtiCache
impl Send for InMemoryJtiCache
impl Sync for InMemoryJtiCache
impl Unpin for InMemoryJtiCache
impl UnsafeUnpin for InMemoryJtiCache
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