diff options
Diffstat (limited to 'src/DotNetOAuth')
-rw-r--r-- | src/DotNetOAuth/ChannelElements/OAuthHttpMethodBindingElement.cs | 28 | ||||
-rw-r--r-- | src/DotNetOAuth/Messages/MessageBase.cs | 3 | ||||
-rw-r--r-- | src/DotNetOAuth/Messaging/MessagingUtilities.cs | 5 |
3 files changed, 35 insertions, 1 deletions
diff --git a/src/DotNetOAuth/ChannelElements/OAuthHttpMethodBindingElement.cs b/src/DotNetOAuth/ChannelElements/OAuthHttpMethodBindingElement.cs index 9a157b5..f247fbc 100644 --- a/src/DotNetOAuth/ChannelElements/OAuthHttpMethodBindingElement.cs +++ b/src/DotNetOAuth/ChannelElements/OAuthHttpMethodBindingElement.cs @@ -11,14 +11,27 @@ namespace DotNetOAuth.ChannelElements { using System.Text;
using DotNetOAuth.Messaging;
+ /// <summary>
+ /// Sets the HTTP Method property on a signed message before the signing module gets to it.
+ /// </summary>
internal class OAuthHttpMethodBindingElement : IChannelBindingElement {
-
#region IChannelBindingElement Members
+ /// <summary>
+ /// Gets the protection offered (if any) by this binding element.
+ /// </summary>
public MessageProtection Protection {
get { return MessageProtection.None; }
}
+ /// <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>
+ /// <returns>
+ /// True if the <paramref name="message"/> applied to this binding element
+ /// and the operation was successful. False otherwise.
+ /// </returns>
public bool PrepareMessageForSending(IProtocolMessage message) {
var oauthMessage = message as ITamperResistantOAuthMessage;
@@ -40,6 +53,19 @@ namespace DotNetOAuth.ChannelElements { }
}
+ /// <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>
+ /// <returns>
+ /// True if the <paramref name="message"/> applied to this binding element
+ /// and the operation was successful. False if the operation did not apply to this message.
+ /// </returns>
+ /// <exception cref="ProtocolException">
+ /// Thrown when the binding element rules indicate that this message is invalid and should
+ /// NOT be processed.
+ /// </exception>
public bool PrepareMessageForReceiving(IProtocolMessage message) {
return false;
}
diff --git a/src/DotNetOAuth/Messages/MessageBase.cs b/src/DotNetOAuth/Messages/MessageBase.cs index 58b3cbf..5edd936 100644 --- a/src/DotNetOAuth/Messages/MessageBase.cs +++ b/src/DotNetOAuth/Messages/MessageBase.cs @@ -38,6 +38,9 @@ namespace DotNetOAuth.Messages { private MessageReceivingEndpoint recipient;
#if DEBUG
+ /// <summary>
+ /// Initializes static members of the <see cref="MessageBase"/> class.
+ /// </summary>
static MessageBase() {
LowSecurityMode = true;
}
diff --git a/src/DotNetOAuth/Messaging/MessagingUtilities.cs b/src/DotNetOAuth/Messaging/MessagingUtilities.cs index 5ec157c..24ad0c4 100644 --- a/src/DotNetOAuth/Messaging/MessagingUtilities.cs +++ b/src/DotNetOAuth/Messaging/MessagingUtilities.cs @@ -140,6 +140,11 @@ namespace DotNetOAuth.Messaging { return new MessageReceivingEndpoint(request.Url, request.HttpMethod == "GET" ? HttpDeliveryMethod.GetRequest : HttpDeliveryMethod.PostRequest);
}
+ /// <summary>
+ /// Copies some extra parameters into a message.
+ /// </summary>
+ /// <param name="message">The message to copy the extra data into.</param>
+ /// <param name="extraParameters">The extra data to copy into the message. May be null to do nothing.</param>
internal static void AddExtraFields(this IProtocolMessage message, IDictionary<string, string> extraParameters) {
if (message == null) {
throw new ArgumentNullException("message");
|