Skip to main content

AuthSession

Trait AuthSession 

Source
pub trait AuthSession:
    Clone
    + Send
    + Sync
    + Serialize
    + Debug
    + 'static {
    // Required methods
    fn id(&self) -> &str;
    fn expires_at(&self) -> DateTime<Utc>;
    fn token(&self) -> &str;
    fn created_at(&self) -> DateTime<Utc>;
    fn updated_at(&self) -> DateTime<Utc>;
    fn ip_address(&self) -> Option<&str>;
    fn user_agent(&self) -> Option<&str>;
    fn user_id(&self) -> &str;
    fn impersonated_by(&self) -> Option<&str>;
    fn active_organization_id(&self) -> Option<&str>;
    fn active(&self) -> bool;
}
Expand description

Trait representing a session entity.

Required Methods§

Source

fn id(&self) -> &str

Source

fn expires_at(&self) -> DateTime<Utc>

Source

fn token(&self) -> &str

Source

fn created_at(&self) -> DateTime<Utc>

Source

fn updated_at(&self) -> DateTime<Utc>

Source

fn ip_address(&self) -> Option<&str>

Source

fn user_agent(&self) -> Option<&str>

Source

fn user_id(&self) -> &str

Source

fn impersonated_by(&self) -> Option<&str>

Source

fn active_organization_id(&self) -> Option<&str>

Source

fn active(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§