Module Naboris.SessionManager
Less commonly used.
val startSession : 'sessionData Req.t -> Res.t -> 'sessionData -> 'sessionData Req.t * Res.t * stringCreate a new session with
'sessionDataand add cookie headers toRes.t. Returns newly created session idstring.
val removeSession : 'sessionData Req.t -> Res.t -> Res.tSets headers on `Res.t` to expire the session.
val resumeSession : 'sessionData ServerConfig.t -> 'sessionData Req.t -> 'sessionData Req.t Lwt.tIntended for internal use.
Applies
mapSessionfrom config to request which uses the session id from the request cookies. Returns promise of a new request with session data available if it was found.