package naboris

  1. Overview
  2. Docs

Less commonly used.

val startSession : 'sessionData Req.t -> Res.t -> 'sessionData -> 'sessionData Req.t * Res.t * string

Create a new session with 'sessionData and add cookie headers to Res.t. Returns newly created session id string.

val removeSession : 'sessionData Req.t -> Res.t -> Res.t

Sets headers on `Res.t` to expire the session.

val resumeSession : 'sessionData ServerConfig.t -> 'sessionData Req.t -> 'sessionData Req.t Lwt.t

Intended for internal use.

Applies mapSession from 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.

val generateSessionId : unit -> string

Intended for internal use.

val sign : string -> string -> string

Intended for internal use.

val unsign : string -> string -> string option

Intended for internal use.

OCaml

Innovation. Community. Security.