#[non_exhaustive]pub struct Session {
pub id: String,
pub status: SessionStatus,
pub last_active_organization_id: Option<String>,
pub last_active_at: Option<i64>,
pub expire_at: Option<i64>,
pub current_task: Option<SessionTask>,
pub tasks: Vec<SessionTask>,
}Expand description
Typed mirror of the fields this crate reads from a Clerk JS Session.
Construct values with Session::new and set optional fields directly;
the struct is #[non_exhaustive] so new clerk-js fields can be mirrored
without a breaking release.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringSession id, e.g. sess_2def.
status: SessionStatusSession status, as reported by clerk-js.
last_active_organization_id: Option<String>Active organization id for this session, as reported by clerk-js, if any. Used to invalidate server-verified org claims when the active organization changes within a session.
last_active_at: Option<i64>Last activity (unix ms).
expire_at: Option<i64>Expiry (unix ms).
current_task: Option<SessionTask>The current pending session task, if the session is not yet fully
active. A signed-in-but-pending session (status == "pending") carries
one; apps route on it to complete the after-auth flow.
tasks: Vec<SessionTask>All pending session tasks, in clerk-js order. clerk-js reports
Array<SessionTask> | null; a null reads as no tasks.