Expand description
Cookie-session-backed identity for the server-rendered admin UI.
Sessions hold a SessionUser — a lightweight projection-backed POD
carrying the aggregate_id UUID, name, and email. Reads from
users_view (Step 2 projection); never touches the retired Diesel
users table.
Structs§
- Session
User - Identity stored in the cookie session after sign-in.
Functions§
- clear_
session_ user - Wipe identity (sign-out path).
- get_
session_ message - Retrieves and clears the flash message from the session.
Returns a tuple of (message_type, message_text) where type is “success” or “error”.
Set
is_jsonto true for structured JSON messages (used by the sign-in page). - get_
session_ user - Read the cached
SessionUser. - is_
authenticated truewhen the cookie session carries aSessionUser.- set_
session_ user - Cache identity in the session after a successful sign-in or profile change.