Resolved configuration
Derived key ring; index 0 seals
Runtime capabilities
Optionalstore: ISessionStore
Server-side store; omit for the cookie strategy
How many keys can open a cookie, for the health indicator.
How the cookie is protected, for the health indicator.
Which strategy is in effect, for the health indicator.
Releases store resources; called from the plugin's onClose.
Writes the session back, when it needs writing.
A clean session emits no header at all: committing on every request would rewrite the cookie on pure reads and defeat downstream caching.
The request context
The session returned by SessionService.load
Returns the session the middleware loaded for this request.
This is the single entry point: the middleware, route handlers, the CSRF middleware, and framework bridges all read the same instance, so no caller can observe a differently-configured session.
The request context
The session for this request
Opens a session from a Headers object alone — the headers-only read for
non-HTTP entry points that have no request context to commit onto (a
WebSocket onOpen handler, an auth strategy reading a cookie).
Read-only by contract: it runs the same envelope-open, snapshot-parse, and
store-read path as SessionService.load but never advances the
session's seen stamp, never commits, and never writes to the store. It
returns null for every condition load treats as "no usable session" —
the cookie is absent or empty, the envelope cannot be opened, the snapshot
cannot be parsed, the absolute expiry or idle timeout has passed, or (on
the store strategy) the stored entry is gone.
The request headers to read the session cookie from
A read-only SessionView, or null when there is no usable session
Loads the session for a request, falling back to a fresh one whenever the cookie is absent, malformed, tampered with, expired, idle, or (on the store strategy) no longer present server-side.
The request context
The session to serve this request with
Loads, exposes, and commits the per-request session.
Since
0.2.0