comparison tests/test.ur @ 3:f59083771ee2

Saving associations
author Adam Chlipala <adam@chlipala.net>
date Sun, 26 Dec 2010 15:11:23 -0500
parents b757dc2bd2f6
children 2d409aff8800
comparison
equal deleted inserted replaced
2:b757dc2bd2f6 3:f59083771ee2
1 fun discover r = 1 fun discover r =
2 dy <- Openid.discover r.Id; 2 dy <- Openid.discover r.Id;
3 case dy of 3 case dy of
4 None => return <xml>No dice</xml> 4 None => return <xml>No dice</xml>
5 | Some dy => return <xml><body> 5 | Some dy =>
6 Endpoint: {[dy.Endpoint]}<br/> 6 os <- Openid.association dy.Endpoint;
7 Local ID: {[dy.LocalId]}<br/> 7 case os of
8 </body></xml> 8 Openid.Error s => error <xml>{[s]}</xml>
9 | Openid.Handle s => return <xml>{[s]}</xml>
9 10
10 fun main () = return <xml><body> 11 fun main () = return <xml><body>
11 <form> 12 <form>
12 <textbox{#Id}/> 13 <textbox{#Id}/>
13 <submit action={discover}/> 14 <submit action={discover}/>