annotate src/ur/openidUser.urs @ 16:9851bc87b0d7

Beginning of OpenidUser
author Adam Chlipala <adam@chlipala.net>
date Thu, 06 Jan 2011 12:48:13 -0500
parents
children df2eb629f21a
rev   line source
adam@16 1 functor Make(M: sig
adam@16 2 con cols :: {Type}
adam@16 3 constraint [Id] ~ cols
adam@16 4 (* Extra columns to add to the user database table *)
adam@16 5
adam@16 6 val sessionLifetime : int
adam@16 7 (* Number of seconds a session may live *)
adam@16 8
adam@16 9 val afterLogout : url
adam@16 10 (* Where to send the user after he logs out *)
adam@16 11
adam@16 12 val secureCookies : bool
adam@16 13 (* Should authentication cookies be restricted to SSL connections? *)
adam@16 14
adam@16 15 val association : Openid.association_mode
adam@16 16 (* OpenID cryptography preferences *)
adam@16 17
adam@16 18 val realm : option string
adam@16 19 (* See end of [Openid] module's documentation for the meaning of realms *)
adam@16 20 end) : sig
adam@16 21
adam@16 22 type user
adam@16 23 val show_user : show user
adam@16 24 val inj_user : sql_injectable_prim user
adam@16 25
adam@16 26 table user : ([Id = user] ++ M.cols)
adam@16 27 PRIMARY KEY Id
adam@16 28
adam@16 29 val current : transaction (option user)
adam@16 30
adam@16 31 val main : (string -> xbody -> transaction page) -> transaction xbody
adam@16 32 (* Pass in your generic page template; get out the HTML snippet for user management *)
adam@16 33
adam@16 34 end