//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.Messaging { using System; /// /// Categorizes the various types of channel binding elements so they can be properly ordered. /// /// /// The order of these enum values is significant. /// Each successive value requires the protection offered by all the previous values /// in order to be reliable. For example, message expiration is meaningless without /// tamper protection to prevent a user from changing the timestamp on a message. /// [Flags] public enum MessageProtections { /// /// No protection. /// None = 0x0, /// /// A binding element that signs a message before sending and validates its signature upon receiving. /// TamperProtection = 0x1, /// /// A binding element that enforces a maximum message age between sending and processing on the receiving side. /// Expiration = 0x2, /// /// A binding element that prepares messages for replay detection and detects replayed messages on the receiving side. /// ReplayProtection = 0x4, /// /// All forms of protection together. /// All = TamperProtection | Expiration | ReplayProtection, } }