comparison src/ur/openidUser.urs @ 48:3f475c6fb168

Make logout clear the session on the server (which necessitates turning it from a link into a button)
author Robin Green <greenrd@greenrd.org>
date Mon, 04 Jul 2011 14:08:00 +0100
parents e31baf0f275e
children a984dc1c8954
comparison
equal deleted inserted replaced
44:f8c9e1e4d337 48:3f475c6fb168
13 signature CTLDISPLAY = sig 13 signature CTLDISPLAY = sig
14 14
15 val formatUser : xbody -> xbody 15 val formatUser : xbody -> xbody
16 (* Format the display of the logged on user *) 16 (* Format the display of the logged on user *)
17 17
18 val formatLogout : url -> xbody 18 val formatLogout : ($([]) -> transaction page) -> xbody
19 (* Format the logout link *) 19 (* Format the logout button *)
20 20
21 val formatSignup : url -> xbody 21 val formatSignup : url -> xbody
22 (* Format the signup link *) 22 (* Format the signup link *)
23 23
24 val formatLogon : ({User : string} -> transaction page) -> xbody 24 val formatLogon : ({User : string} -> transaction page) -> xbody
105 val current : transaction (option user) 105 val current : transaction (option user)
106 (* Figure out which, if any, user is logged in on this connection. *) 106 (* Figure out which, if any, user is logged in on this connection. *)
107 107
108 108
109 val main : (string -> xbody -> transaction page) -> transaction {Status : xbody, 109 val main : (string -> xbody -> transaction page) -> transaction {Status : xbody,
110 Other : {Url : url, Xml : xbody}} 110 Other : {Url : option url, Xml : xbody}}
111 111
112 (* Pass in your generic page template; get out the HTML snippet for user 112 (* Pass in your generic page template; get out the HTML snippet for user
113 * management, suitable for, e.g., inclusion in your standard page 113 * management, suitable for, e.g., inclusion in your standard page
114 * header. The output gives a "status" chunk, which will either be a login 114 * header. The output gives a "status" chunk, which will either be a login
115 * form or a message about which user is logged in; and an "other" chunk, 115 * form or a message about which user is logged in; and an "other" chunk,
116 * which will be a log out or sign up link. In the case "other", the link 116 * which will be a log out button or sign up link. In the case of "other",
117 * itself is also provided for cases when one format is not enough. *) 117 * the link itself (if available) is also provided for cases when one
118 * format is not enough. *)
118 119
119 end 120 end
120 121
121 (* Functor outputs will contain buttons specialized to particular well-known 122 (* Functor outputs will contain buttons specialized to particular well-known
122 * OpenID providers. Use these CSS classes to style those buttons. *) 123 * OpenID providers. Use these CSS classes to style those buttons. *)