diff 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
line wrap: on
line diff
--- a/tests/test.ur	Sun Dec 26 15:11:23 2010 -0500
+++ b/tests/test.ur	Sun Dec 26 17:19:52 2010 -0500
@@ -1,16 +1,10 @@
-fun discover r =
-    dy <- Openid.discover r.Id;
-    case dy of
-        None => return <xml>No dice</xml>
-      | Some dy =>
-        os <- Openid.association dy.Endpoint;
-        case os of
-            Openid.Error s => error <xml>{[s]}</xml>
-          | Openid.Handle s => return <xml>{[s]}</xml>
+fun auth r =
+    msg <- Openid.authenticate r.Id;
+    error <xml>{[msg]}</xml>
 
 fun main () = return <xml><body>
   <form>
     <textbox{#Id}/>
-    <submit action={discover}/>
+    <submit action={auth}/>
   </form>
 </body></xml>