Expand description
Server-side sessions.
Sessions are opt-in. The cookie holds only a random 256-bit identifier;
data lives in a SessionStore, so nothing needs to be signed and no
data is exposed to the client.
ⓘ
App::new(routes()).middleware(sessions(MemorySessionStore::default()))
// in a page: pub fn Page(Extension(session): Extension<Session>) -> impl ViewStructs§
- Memory
Session Store - In-memory store for development and single-instance deployments.
- Session
- Request-scoped session handle (cheap to clone).
Constants§
Traits§
- Session
Store - Session storage backend.
Functions§
- sessions
- Session middleware.
- sessions_
with_ ttl