comparison tests/test.ur @ 4:2d409aff8800

Received an OpenID authentication response, but haven't checked it yet
author Adam Chlipala <adam@chlipala.net>
date Sun, 26 Dec 2010 17:19:52 -0500
parents f59083771ee2
children 870d99055dd1
comparison
equal deleted inserted replaced
3:f59083771ee2 4:2d409aff8800
1 fun discover r = 1 fun auth r =
2 dy <- Openid.discover r.Id; 2 msg <- Openid.authenticate r.Id;
3 case dy of 3 error <xml>{[msg]}</xml>
4 None => return <xml>No dice</xml>
5 | Some dy =>
6 os <- Openid.association dy.Endpoint;
7 case os of
8 Openid.Error s => error <xml>{[s]}</xml>
9 | Openid.Handle s => return <xml>{[s]}</xml>
10 4
11 fun main () = return <xml><body> 5 fun main () = return <xml><body>
12 <form> 6 <form>
13 <textbox{#Id}/> 7 <textbox{#Id}/>
14 <submit action={discover}/> 8 <submit action={auth}/>
15 </form> 9 </form>
16 </body></xml> 10 </body></xml>