Skip to main content

SessionProvider

Trait SessionProvider 

Source
pub trait SessionProvider: Send + Sync {
    type Identity;

    // Required method
    fn load_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Identity>, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for a session store that can load an identity.

Required Associated Types§

Source

type Identity

The type of identity returned by this provider.

Required Methods§

Source

fn load_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Identity>, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load the identity associated with the session ID.

Implementors§