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§
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§
Sourcefn secondary_snapshot(&self) -> AuthResult<Value>
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.
Sourcefn from_secondary_snapshot(_snapshot: Value) -> AuthResult<Self>
fn from_secondary_snapshot(_snapshot: Value) -> AuthResult<Self>
Restore a model from a trusted secondary backend, before public projection.
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>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".