annotate tests/test.ur @ 54:1876aa854263

Merge from upstream.
author Karn Kallio <kkallio@eka>
date Mon, 04 Jul 2011 10:36:15 -0430
parents f6b3fbf10dac
children
rev   line source
adam@10 1 fun afterward r = return <xml><body>
adam@10 2 {case r of
adam@10 3 Openid.Canceled => <xml>You canceled that sucker.</xml>
adam@10 4 | Openid.Failure s => error <xml>OpenID failure: {[s]}</xml>
adam@10 5 | Openid.AuthenticatedAs id => <xml>I now know you as <tt>{[id]}</tt>.</xml>}
adam@10 6 </body></xml>
adam@10 7
adam@4 8 fun auth r =
adam@10 9 msg <- Openid.authenticate afterward
adam@15 10 {Association = Openid.Stateful {AssociationType = Openid.HMAC_SHA256,
adam@15 11 AssociationSessionType = Openid.NoEncryption},
adam@39 12 Identifier = Openid.KnownIdentifier r.Id,
adam@15 13 Realm = Some "http://localhost:8080/"};
adam@4 14 error <xml>{[msg]}</xml>
adam@1 15
adam@1 16 fun main () = return <xml><body>
adam@1 17 <form>
adam@1 18 <textbox{#Id}/>
adam@4 19 <submit action={auth}/>
adam@1 20 </form>
adam@1 21 </body></xml>