diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-13 13:42:46 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-13 13:42:46 -0700 |
commit | f665e1e639319918385fcc8397f8c0d5009e3bdd (patch) | |
tree | 6219f476ab24bc187eac79b501d7de73c9acd234 /src/DotNetOAuth/Messaging/IChannelBindingElement.cs | |
parent | 61650a6ec207c94cb92e27227dac75606c3e7e00 (diff) | |
download | DotNetOpenAuth-f665e1e639319918385fcc8397f8c0d5009e3bdd.zip DotNetOpenAuth-f665e1e639319918385fcc8397f8c0d5009e3bdd.tar.gz DotNetOpenAuth-f665e1e639319918385fcc8397f8c0d5009e3bdd.tar.bz2 |
Totally refactored signing, expiration and replay detection into extensible channel binding elements.
Diffstat (limited to 'src/DotNetOAuth/Messaging/IChannelBindingElement.cs')
-rw-r--r-- | src/DotNetOAuth/Messaging/IChannelBindingElement.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/DotNetOAuth/Messaging/IChannelBindingElement.cs b/src/DotNetOAuth/Messaging/IChannelBindingElement.cs new file mode 100644 index 0000000..5e72d36 --- /dev/null +++ b/src/DotNetOAuth/Messaging/IChannelBindingElement.cs @@ -0,0 +1,36 @@ +//-----------------------------------------------------------------------
+// <copyright file="IChannelBindingElement.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOAuth.Messaging {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+
+ /// <summary>
+ /// An interface that must be implemented by message transforms/validators in order
+ /// to be included in the channel stack.
+ /// </summary>
+ internal interface IChannelBindingElement {
+ /// <summary>
+ /// Gets the protection offered (if any) by this binding element.
+ /// </summary>
+ ChannelProtection Protection { get; }
+
+ /// <summary>
+ /// Prepares a message for sending based on the rules of this channel binding element.
+ /// </summary>
+ /// <param name="message">The message to prepare for sending.</param>
+ void PrepareMessageForSending(IProtocolMessage message);
+
+ /// <summary>
+ /// Performs any transformation on an incoming message that may be necessary and/or
+ /// validates an incoming message based on the rules of this channel binding element.
+ /// </summary>
+ /// <param name="message">The incoming message to process.</param>
+ void PrepareMessageForReceiving(IProtocolMessage message);
+ }
+}
|