diff src/ur/openid.urs @ 13:de04a3fc6b72

Stateless verification worked
author Adam Chlipala <adam@chlipala.net>
date Sun, 02 Jan 2011 10:11:38 -0500
parents 194577b60771
children 35bc4da563dd
line wrap: on
line diff
--- a/src/ur/openid.urs	Sat Jan 01 14:00:52 2011 -0500
+++ b/src/ur/openid.urs	Sun Jan 02 10:11:38 2011 -0500
@@ -1,10 +1,14 @@
 datatype association_type = HMAC_SHA1 | HMAC_SHA256
 datatype association_session_type = NoEncryption | DH_SHA1 | DH_SHA256
+datatype association_mode =
+         Stateless
+       | Stateful of {AssociationType : association_type,
+                      AssociationSessionType : association_session_type}
+
 datatype authentication = AuthenticatedAs of string | Canceled | Failure of string
 
 val authenticate : (authentication -> transaction page)
-                   -> {AssociationType : association_type,
-                       AssociationSessionType : association_session_type,
+                   -> {Association : association_mode,
                        Identifier : string}
                    -> transaction string
 (* Doesn't return normally if everything goes as planned.