Struct salvo_csrf::SessionStore
source · pub struct SessionStore { /* private fields */ }
Available on crate feature
session-store
only.Expand description
CookieStore is a CsrfStore
implementation that stores the CSRF secret in a session.
Implementations§
source§impl SessionStore
impl SessionStore
Trait Implementations§
source§impl CsrfStore for SessionStore
impl CsrfStore for SessionStore
source§fn load_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 mut Request,
depot: &'life2 mut Depot
) -> Pin<Box<dyn Future<Output = Option<Vec<u8>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn load_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 mut Request,
depot: &'life2 mut Depot
) -> Pin<Box<dyn Future<Output = Option<Vec<u8>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Get the secret from the store.
source§fn save_secret<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_req: &'life1 mut Request,
depot: &'life2 mut Depot,
_res: &'life3 mut Response,
secret: &'life4 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn save_secret<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_req: &'life1 mut Request,
depot: &'life2 mut Depot,
_res: &'life3 mut Response,
secret: &'life4 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Save the secret from the store.