pub struct MemoryCsrfStore { /* private fields */ }Expand description
In-memory CSRF store with TTL-backed one-time semantics.
Implementations§
Trait Implementations§
Source§impl CsrfStore for MemoryCsrfStore
impl CsrfStore for MemoryCsrfStore
Source§fn store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
nonce: &'life2 str,
redirect_url: Option<String>,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
nonce: &'life2 str,
redirect_url: Option<String>,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store a state nonce with optional redirect URL.
Returns true if stored successfully.
Source§fn retrieve_and_consume<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<(String, Option<String>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn retrieve_and_consume<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<(String, Option<String>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve and consume a state nonce (one-time use).
Returns (nonce, redirect_url) if found and not expired.
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryCsrfStore
impl Freeze for MemoryCsrfStore
impl Send for MemoryCsrfStore
impl Sync for MemoryCsrfStore
impl Unpin for MemoryCsrfStore
impl UnsafeUnpin for MemoryCsrfStore
impl UnwindSafe for MemoryCsrfStore
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