adam@16: functor Make(M: sig adam@16: con cols :: {Type} adam@16: constraint [Id] ~ cols adam@16: (* Extra columns to add to the user database table *) adam@16: adam@16: val sessionLifetime : int adam@16: (* Number of seconds a session may live *) adam@16: adam@16: val afterLogout : url adam@16: (* Where to send the user after he logs out *) adam@16: adam@16: val secureCookies : bool adam@16: (* Should authentication cookies be restricted to SSL connections? *) adam@16: adam@16: val association : Openid.association_mode adam@16: (* OpenID cryptography preferences *) adam@16: adam@16: val realm : option string adam@16: (* See end of [Openid] module's documentation for the meaning of realms *) adam@16: end) : sig adam@16: adam@16: type user adam@16: val show_user : show user adam@16: val inj_user : sql_injectable_prim user adam@16: adam@16: table user : ([Id = user] ++ M.cols) adam@16: PRIMARY KEY Id adam@16: adam@16: val current : transaction (option user) adam@16: adam@16: val main : (string -> xbody -> transaction page) -> transaction xbody adam@16: (* Pass in your generic page template; get out the HTML snippet for user management *) adam@16: adam@16: end