module
Session::Web
Defined in:
azu.crMacro Summary
-
accessors(session_type)
Adds
HTTP::Server::Context#session(typed assession_type) and#flash. -
use_store(store_type)
Declares the session type and its store (
Session.use_store) and adds the typedHTTP::Server::Context#sessionandHTTP::Server::Context#flashaccessors.
Macro Detail
Adds HTTP::Server::Context#session (typed as session_type) and #flash. They read the
current request's session, so they are only meaningful behind a Session::SessionHandler.
Call it after Session.use_store, and once: calling it again redefines the accessors and their
types for the whole program.
They are valid inside the request's fiber only (a spawned fiber, or a WebSocket channel after
the handler returned, has no session) and raise MissingSession anywhere else.
Declares the session type and its store (Session.use_store) and adds the typed
HTTP::Server::Context#session and HTTP::Server::Context#flash accessors.