Mercurial > openid
view 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 |
line wrap: on
line source
fun afterward r = return <xml><body> {case r of Openid.Canceled => <xml>You canceled that sucker.</xml> | Openid.Failure s => error <xml>OpenID failure: {[s]}</xml> | Openid.AuthenticatedAs id => <xml>I now know you as <tt>{[id]}</tt>.</xml>} </body></xml> fun auth r = msg <- Openid.authenticate afterward {Association = Openid.Stateless (* Openid.Stateful {AssociationType = Openid.HMAC_SHA256, AssociationSessionType = Openid.NoEncryption} *), Identifier = r.Id}; error <xml>{[msg]}</xml> fun main () = return <xml><body> <form> <textbox{#Id}/> <submit action={auth}/> </form> </body></xml>