Mercurial > openid
diff src/ur/openid.urs @ 10:194577b60771
Call user-specified function after authentication
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 29 Dec 2010 14:38:56 -0500 |
parents | 870d99055dd1 |
children | de04a3fc6b72 |
line wrap: on
line diff
--- a/src/ur/openid.urs Wed Dec 29 14:17:27 2010 -0500 +++ b/src/ur/openid.urs Wed Dec 29 14:38:56 2010 -0500 @@ -1,6 +1,12 @@ datatype association_type = HMAC_SHA1 | HMAC_SHA256 datatype association_session_type = NoEncryption | DH_SHA1 | DH_SHA256 +datatype authentication = AuthenticatedAs of string | Canceled | Failure of string -val authenticate : association_type -> association_session_type -> string -> transaction string +val authenticate : (authentication -> transaction page) + -> {AssociationType : association_type, + AssociationSessionType : association_session_type, + Identifier : string} + -> transaction string (* Doesn't return normally if everything goes as planned. - * Instead, the user is redirected to his OP to authenticate there. *) + * Instead, the user is redirected to his OP to authenticate there. + * Later, the function passed as the first argument should be called with the result. *)