summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Messages/SignedMessageBase.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-10-04 16:44:16 -0700
committerAndrew <andrewarnott@gmail.com>2008-10-04 16:44:16 -0700
commit3273432532a1d3ba03d19663cbbbd748b3ea5094 (patch)
tree76d2a6c2ed9fb3457909b9669fc03952da16b8dc /src/DotNetOAuth/Messages/SignedMessageBase.cs
parentd89b47ef7d65ec863e8858e4cc52024c77092915 (diff)
downloadDotNetOpenAuth-3273432532a1d3ba03d19663cbbbd748b3ea5094.zip
DotNetOpenAuth-3273432532a1d3ba03d19663cbbbd748b3ea5094.tar.gz
DotNetOpenAuth-3273432532a1d3ba03d19663cbbbd748b3ea5094.tar.bz2
Changed the way HttpMethod is derived for signing verification.
Diffstat (limited to 'src/DotNetOAuth/Messages/SignedMessageBase.cs')
-rw-r--r--src/DotNetOAuth/Messages/SignedMessageBase.cs14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/DotNetOAuth/Messages/SignedMessageBase.cs b/src/DotNetOAuth/Messages/SignedMessageBase.cs
index 88e6239..75fa8ca 100644
--- a/src/DotNetOAuth/Messages/SignedMessageBase.cs
+++ b/src/DotNetOAuth/Messages/SignedMessageBase.cs
@@ -30,17 +30,12 @@ namespace DotNetOAuth.Messages {
/// Initializes a new instance of the <see cref="SignedMessageBase"/> class.
/// </summary>
/// <param name="transport">A value indicating whether this message requires a direct or indirect transport.</param>
- internal SignedMessageBase(MessageTransport transport)
- : base(MessageProtection.All, transport) {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="SignedMessageBase"/> class.
- /// </summary>
- /// <param name="transport">A value indicating whether this message requires a direct or indirect transport.</param>
/// <param name="recipient">The URI that a directed message will be delivered to.</param>
internal SignedMessageBase(MessageTransport transport, MessageReceivingEndpoint recipient)
: base(MessageProtection.All, transport, recipient) {
+ ITamperResistantOAuthMessage self = (ITamperResistantOAuthMessage)this;
+ HttpDeliveryMethod methods = ((IOAuthDirectedMessage)this).HttpMethods;
+ self.HttpMethod = (methods & HttpDeliveryMethod.PostRequest) != 0 ? "POST" : "GET";
}
#region ITamperResistantOAuthMessage Members
@@ -53,7 +48,6 @@ namespace DotNetOAuth.Messages {
/// <summary>
/// Gets or sets the Token Secret used to sign the message.
- /// Only applicable to Consumer.
/// </summary>
public string TokenSecret { get; set; }
@@ -65,13 +59,11 @@ namespace DotNetOAuth.Messages {
/// <summary>
/// Gets or sets the Consumer Secret used to sign the message.
- /// Only applicable to Consumer.
/// </summary>
public string ConsumerSecret { get; set; }
/// <summary>
/// Gets or sets the HTTP method that will be used to transmit the message.
- /// Only applicable to Consumer.
/// </summary>
string ITamperResistantOAuthMessage.HttpMethod { get; set; }