annotate tests/test.ur @ 14:6b2a44da71b0
Change postify to satisfy more OPs; add untested invalidate_handle support
author |
Adam Chlipala <adam@chlipala.net> |
date |
Sun, 02 Jan 2011 10:33:07 -0500 |
parents |
de04a3fc6b72 |
children |
35bc4da563dd |
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@13
|
10 {Association = Openid.Stateless (* Openid.Stateful {AssociationType = Openid.HMAC_SHA256,
|
adam@13
|
11 AssociationSessionType = Openid.NoEncryption} *),
|
adam@10
|
12 Identifier = r.Id};
|
adam@4
|
13 error <xml>{[msg]}</xml>
|
adam@1
|
14
|
adam@1
|
15 fun main () = return <xml><body>
|
adam@1
|
16 <form>
|
adam@1
|
17 <textbox{#Id}/>
|
adam@4
|
18 <submit action={auth}/>
|
adam@1
|
19 </form>
|
adam@1
|
20 </body></xml>
|