adam@8: datatype association_type = HMAC_SHA1 | HMAC_SHA256 adam@8: datatype association_session_type = NoEncryption | DH_SHA1 | DH_SHA256 adam@13: datatype association_mode = adam@13: Stateless adam@13: | Stateful of {AssociationType : association_type, adam@13: AssociationSessionType : association_session_type} adam@13: adam@10: datatype authentication = AuthenticatedAs of string | Canceled | Failure of string adam@8: adam@10: val authenticate : (authentication -> transaction page) adam@13: -> {Association : association_mode, adam@10: Identifier : string} adam@10: -> transaction string adam@4: (* Doesn't return normally if everything goes as planned. adam@10: * Instead, the user is redirected to his OP to authenticate there. adam@10: * Later, the function passed as the first argument should be called with the result. *)