summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Messages/MessageBase.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-09-23 08:08:04 -0700
committerAndrew <andrewarnott@gmail.com>2008-09-23 08:08:04 -0700
commit22341a07b0ba0dc685bb859b0ed82c22fc3c09db (patch)
tree3a735cce2271b5b7b276bf5e4620348580726ba4 /src/DotNetOAuth/Messages/MessageBase.cs
parent77adf75348090e79d3e93bff78a74c8688d8b58b (diff)
downloadDotNetOpenAuth-22341a07b0ba0dc685bb859b0ed82c22fc3c09db.zip
DotNetOpenAuth-22341a07b0ba0dc685bb859b0ed82c22fc3c09db.tar.gz
DotNetOpenAuth-22341a07b0ba0dc685bb859b0ed82c22fc3c09db.tar.bz2
Implementing and refactoring ServiceProvider and Consumer classes.
Beginning to write a test for the spec's appendix A scenario.
Diffstat (limited to 'src/DotNetOAuth/Messages/MessageBase.cs')
-rw-r--r--src/DotNetOAuth/Messages/MessageBase.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/DotNetOAuth/Messages/MessageBase.cs b/src/DotNetOAuth/Messages/MessageBase.cs
index db5830c..599cc4f 100644
--- a/src/DotNetOAuth/Messages/MessageBase.cs
+++ b/src/DotNetOAuth/Messages/MessageBase.cs
@@ -14,7 +14,7 @@ namespace DotNetOAuth.Messages {
/// <summary>
/// A base class for all OAuth messages.
/// </summary>
- internal abstract class MessageBase : IDirectedProtocolMessage {
+ internal abstract class MessageBase : IOAuthDirectedMessage {
/// <summary>
/// A store for extra name/value data pairs that are attached to this message.
/// </summary>
@@ -33,7 +33,7 @@ namespace DotNetOAuth.Messages {
/// <summary>
/// The URI to the remote endpoint to send this message to.
/// </summary>
- private Uri recipient;
+ private ServiceProviderEndpoint recipient;
/// <summary>
/// Initializes a new instance of the <see cref="MessageBase"/> class.
@@ -51,7 +51,7 @@ namespace DotNetOAuth.Messages {
/// <param name="protectionRequired">The level of protection the message requires.</param>
/// <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>
- protected MessageBase(MessageProtection protectionRequired, MessageTransport transport, Uri recipient) {
+ protected MessageBase(MessageProtection protectionRequired, MessageTransport transport, ServiceProviderEndpoint recipient) {
if (recipient == null) {
throw new ArgumentNullException("recipient");
}
@@ -99,7 +99,18 @@ namespace DotNetOAuth.Messages {
/// Gets the URI to the Service Provider endpoint to send this message to.
/// </summary>
Uri IDirectedProtocolMessage.Recipient {
- get { return this.recipient; }
+ get { return this.recipient.Location; }
+ }
+
+ #endregion
+
+ #region IOAuthDirectedMessage Properties
+
+ /// <summary>
+ /// Gets the preferred method of transport for the message.
+ /// </summary>
+ HttpDeliveryMethod IOAuthDirectedMessage.HttpMethods {
+ get { return this.recipient.AllowedMethods; }
}
#endregion