diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-01-12 08:40:50 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-01-12 08:42:14 -0800 |
commit | af21cdaf77ca72f54e04f22268b740ce262582fa (patch) | |
tree | 9b158e3bff1f56264bccb9e45c8b807816beece6 /src/DotNetOpenAuth.Core/Messaging/MessageProtections.cs | |
parent | a73f2a4830aaa2afcb3f13da2206d9b011dad7fb (diff) | |
download | DotNetOpenAuth-af21cdaf77ca72f54e04f22268b740ce262582fa.zip DotNetOpenAuth-af21cdaf77ca72f54e04f22268b740ce262582fa.tar.gz DotNetOpenAuth-af21cdaf77ca72f54e04f22268b740ce262582fa.tar.bz2 |
Renamed assembly DotNetOpenAuth.Messaging(.UI) to DotNetOpenAuth.Core(.UI)
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/MessageProtections.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/MessageProtections.cs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/MessageProtections.cs b/src/DotNetOpenAuth.Core/Messaging/MessageProtections.cs new file mode 100644 index 0000000..c78c92f --- /dev/null +++ b/src/DotNetOpenAuth.Core/Messaging/MessageProtections.cs @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------- +// <copyright file="MessageProtections.cs" company="Andrew Arnott"> +// Copyright (c) Andrew Arnott. All rights reserved. +// </copyright> +//----------------------------------------------------------------------- + +namespace DotNetOpenAuth.Messaging { + using System; + + /// <summary> + /// Categorizes the various types of channel binding elements so they can be properly ordered. + /// </summary> + /// <remarks> + /// 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. + /// </remarks> + [Flags] + public enum MessageProtections { + /// <summary> + /// No protection. + /// </summary> + None = 0x0, + + /// <summary> + /// A binding element that signs a message before sending and validates its signature upon receiving. + /// </summary> + TamperProtection = 0x1, + + /// <summary> + /// A binding element that enforces a maximum message age between sending and processing on the receiving side. + /// </summary> + Expiration = 0x2, + + /// <summary> + /// A binding element that prepares messages for replay detection and detects replayed messages on the receiving side. + /// </summary> + ReplayProtection = 0x4, + + /// <summary> + /// All forms of protection together. + /// </summary> + All = TamperProtection | Expiration | ReplayProtection, + } +}
\ No newline at end of file |