summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Messaging/Messaging/MessageProtections.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2011-07-01 16:49:44 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2011-07-01 16:49:44 -0700
commitb6f7a18b949acb4346754ae47fb07424076a3cd0 (patch)
tree4c23cb2b8174f3288cb0b787cff4c6ac432c6bef /src/DotNetOpenAuth.Messaging/Messaging/MessageProtections.cs
parentf16525005555b86151b7a1c741aa29550635108a (diff)
downloadDotNetOpenAuth-b6f7a18b949acb4346754ae47fb07424076a3cd0.zip
DotNetOpenAuth-b6f7a18b949acb4346754ae47fb07424076a3cd0.tar.gz
DotNetOpenAuth-b6f7a18b949acb4346754ae47fb07424076a3cd0.tar.bz2
First pass at dividing DotNetOpenAuth features into separate assemblies.
Nothing compiles at this point.
Diffstat (limited to 'src/DotNetOpenAuth.Messaging/Messaging/MessageProtections.cs')
-rw-r--r--src/DotNetOpenAuth.Messaging/Messaging/MessageProtections.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Messaging/Messaging/MessageProtections.cs b/src/DotNetOpenAuth.Messaging/Messaging/MessageProtections.cs
new file mode 100644
index 0000000..c78c92f
--- /dev/null
+++ b/src/DotNetOpenAuth.Messaging/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