adam@8: datatype association_type = HMAC_SHA1 | HMAC_SHA256 adam@8: datatype association_session_type = NoEncryption | DH_SHA1 | DH_SHA256 adam@10: datatype authentication = AuthenticatedAs of string | Canceled | Failure of string adam@8: adam@10: val authenticate : (authentication -> transaction page) adam@10: -> {AssociationType : association_type, adam@10: AssociationSessionType : association_session_type, 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. *)