Skip to main content

Module session

Module session 

Source
Expand description

Cookie/session strategy — integrates with doido_controller::session.

Structs§

SessionStrategy
Cookie/session strategy using the encrypted cookie store.

Constants§

SESSION_COOKIE
Cookie name for the encrypted session (matches doido_controller::context).
USER_ID_KEY
Session data key for the authenticated user’s id.

Functions§

clear_session_cookie
Clear the session cookie in a response.
encode_session_cookie
Encode the session into a Set-Cookie value for _doido_session.
from_config
Build a session strategy from config (uses the process-global secret key base).
sign_in_session
Store user_id in the session bag (call after successful sign-in).
sign_out_session
Clear the authenticated user from the session.