Skip to main content

AuthSession

Trait AuthSession 

Source
pub trait AuthSession:
    Clone
    + Send
    + Sync
    + Serialize
    + Debug
    + 'static {
Show 16 methods // Required methods fn id(&self) -> Cow<'_, 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) -> Cow<'_, str>; fn impersonated_by(&self) -> Option<&str>; fn active_organization_id(&self) -> Option<&str>; // Provided methods fn secondary_snapshot(&self) -> AuthResult<Value> { ... } fn from_secondary_snapshot(_snapshot: Value) -> AuthResult<Self> { ... } fn adapter_snapshot(&self) -> Option<&AdapterOutput> { ... } fn retained_session_view(&self) -> Option<&SessionView> { ... } fn additional_fields(&self) -> Map<String, Value> { ... } fn active_team_id(&self) -> Option<&str> { ... }
}
Expand description

Trait representing a session entity.

Required Methods§

Source

fn id(&self) -> Cow<'_, 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) -> Cow<'_, str>

Source

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

Source

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

Provided Methods§

Source

fn secondary_snapshot(&self) -> AuthResult<Value>

Encode the complete typed model for a trusted secondary backend. Custom entities can opt in without adding a Deserialize bound to all schemas.

Source

fn from_secondary_snapshot(_snapshot: Value) -> AuthResult<Self>

Restore a model from a trusted secondary backend, before public projection.

Source

fn adapter_snapshot(&self) -> Option<&AdapterOutput>

Source

fn retained_session_view(&self) -> Option<&SessionView>

Source

fn additional_fields(&self) -> Map<String, Value>

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§