Skip to main content

SessionManager

Trait SessionManager 

Source
pub trait SessionManager: Send + Sync {
    // Required methods
    fn get_session<'life0, 'async_trait>(
        &'life0 self,
        service_identity_key: PublicKey,
    ) -> Pin<Box<dyn Future<Output = Result<Session, SessionManagerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_session<'life0, 'async_trait>(
        &'life0 self,
        service_identity_key: PublicKey,
        session: Session,
    ) -> Pin<Box<dyn Future<Output = Result<(), SessionManagerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Persistent storage for authentication sessions, keyed by the service’s identity public key. Implementations should be thread-safe and may be backed by an in-memory map (default) or a shared database for cross-pod auth sharing.

Required Methods§

Source

fn get_session<'life0, 'async_trait>( &'life0 self, service_identity_key: PublicKey, ) -> Pin<Box<dyn Future<Output = Result<Session, SessionManagerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn set_session<'life0, 'async_trait>( &'life0 self, service_identity_key: PublicKey, session: Session, ) -> Pin<Box<dyn Future<Output = Result<(), SessionManagerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§