Skip to main content

AuthSessionVerifier

Trait AuthSessionVerifier 

Source
pub trait AuthSessionVerifier:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn verify_session(
        &self,
        token: &str,
        tick: Option<u64>,
    ) -> Result<VerifiedSession, AuthError>;
    fn is_session_authorized(&self, jti: &str, tick: Option<u64>) -> bool;
}
Expand description

Core trait for session verification and management.

Required Methods§

Source

fn verify_session( &self, token: &str, tick: Option<u64>, ) -> Result<VerifiedSession, AuthError>

Verifies a session token and returns the verified session details.

Source

fn is_session_authorized(&self, jti: &str, tick: Option<u64>) -> bool

Checks if a session JTI is still authorized.

Implementors§