pub enum CsrfStoreType {
Memory(MemoryCsrfStore),
}Expand description
Multi-backend CSRF store.
Variants§
Memory(MemoryCsrfStore)
In-memory backend (single-instance only).
Implementations§
Source§impl CsrfStoreType
impl CsrfStoreType
Trait Implementations§
Source§impl CsrfStore for CsrfStoreType
impl CsrfStore for CsrfStoreType
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 CsrfStoreType
impl Freeze for CsrfStoreType
impl Send for CsrfStoreType
impl Sync for CsrfStoreType
impl Unpin for CsrfStoreType
impl UnsafeUnpin for CsrfStoreType
impl UnwindSafe for CsrfStoreType
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