comparison src/ur/openidUser.ur @ 32:90b8ce9be9f5

Change some field names and update utest
author Adam Chlipala <adam@chlipala.net>
date Thu, 21 Apr 2011 13:24:55 -0400
parents 1be573ac8e2b
children df258dbf4739
comparison
equal deleted inserted replaced
31:1be573ac8e2b 32:90b8ce9be9f5
27 val association : Openid.association_mode 27 val association : Openid.association_mode
28 val realm : option string 28 val realm : option string
29 val formClass : css_class 29 val formClass : css_class
30 val fakeId : option string 30 val fakeId : option string
31 31
32 val ctlDisplay : {User : {Status : xbody, Other : xbody}, 32 val ctlDisplay : {User : {Status : xbody, Logout : xbody},
33 Guest : {Status : xbody, Other : xbody}} 33 Guest : {Status : xbody, Signup : xbody}}
34 end) = struct 34 end) = struct
35 35
36 type user = string 36 type user = string
37 val eq_user = _ 37 val eq_user = _
38 val read_user = _ 38 val read_user = _
298 in 298 in
299 cur <- current; 299 cur <- current;
300 here <- currentUrl; 300 here <- currentUrl;
301 case cur of 301 case cur of
302 Some cur => return {Status = <xml>{M.ctlDisplay.User.Status}{[cur]}</xml>, 302 Some cur => return {Status = <xml>{M.ctlDisplay.User.Status}{[cur]}</xml>,
303 Other = <xml><a link={logout ()}>{M.ctlDisplay.User.Other}</a></xml>} 303 Other = <xml><a link={logout ()}>{M.ctlDisplay.User.Logout}</a></xml>}
304 | None => return {Status = <xml>{M.ctlDisplay.Guest.Status}<form><textbox{#User}/> <submit value="Log In" action={logon (show here)}/></form></xml>, 304 | None => return {Status = <xml>{M.ctlDisplay.Guest.Status}<form><textbox{#User}/> <submit value="Log In" action={logon (show here)}/></form></xml>,
305 Other = <xml><a link={signup (show here)}>{M.ctlDisplay.Guest.Other}</a></xml>} 305 Other = <xml><a link={signup (show here)}>{M.ctlDisplay.Guest.Signup}</a></xml>}
306 end 306 end
307 307
308 task periodic 60 = fn () => dml (DELETE FROM session 308 task periodic 60 = fn () => dml (DELETE FROM session
309 WHERE Expires < CURRENT_TIMESTAMP) 309 WHERE Expires < CURRENT_TIMESTAMP)
310 310