Functor Model.FCgi_session_cookies


module FCgi_session_cookies: 
functor (M : Session_model) -> sig .. end
A functor to create the module with the functions to manage sessions between pages using cookies.
Parameters:
M : Session_model

type user = M.t 
type html = M.html 
type session_id = M.session_id 
type callback = Env.cgi_env ->
user option -> html
A callback is a function to call for a given page. The function takes Then the function returns an HTML document.
type cookie_callback = Env.cgi_env ->
user option ->
html * Model.cookie_action list
val session_id : Env.cgi_env -> session_id option
Get the session id, if the user is connected.
val register : string -> callback -> unit
Register a callback.
val cookie_register : string -> cookie_callback -> unit
Register a cookie_callback.
val arg_of_callback : string -> string
Take a page name and build the code to append to an url to go to this callback.
val main : default:cookie_callback -> unit
USe the required callback (according to the value of the variable for the callback in the url. This is the function to call at the end of the program. The default callback is given in argument.