Expand description
Cookie-backed sessions for Sova (Express express-session-style).
Flash helpers (Session::flash, Session::take) store one-shot values for the next
request (status messages, validation errors, old form input).
Persistence is SessionStore: KvSessionStore, [SqlSessionStore], or
[RedisSessionStore]. Logout others/all:
SessionExt::logout_other_sessions / SessionExt::logout_all_sessions.
Structs§
- KvSession
Store SessionStoreover anyKvStore(memory / file / redis /sova_kv).- Session
- Shared per-request session (cheap to clone into middleware after
next). - Session
Layer - Session middleware over a
SessionStore. - Session
Logout All - Fired after
crate::SessionExt::logout_all_sessionsdestroys sessions. - Session
Regenerated - Fired when
crate::Session::regenerateissues a new session id. - Session
Store Handle - App-state handle so handlers can call
SessionStore::destroy_user.
Enums§
- Same
Site - The
SameSitecookie attribute.
Constants§
- FLASH_
ERRORS - Session key for validation error map JSON (templates:
errors). - FLASH_
OLD - Session key for old form input JSON (templates:
old). - FLASH_
STATUS - Session key for a one-line success/status message (templates:
status). - SESSION_
USER_ KEY - Session data key storing the authenticated user id (
super::Session::bind_user).
Traits§
- Session
Ext - Convenient access to the request
Session(empty session if the layer is absent). - Session
Store - Backend for cookie sessions (load/save/destroy + logout-by-user).
Functions§
- memory_
sessions - Default in-memory sessions (
sova_store::MemoryStoreundersess:).