summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/ChannelElements/OAuthChannel.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-09-29 23:16:41 -0700
committerAndrew <andrewarnott@gmail.com>2008-10-02 07:33:55 -0700
commit5cbd5d7edb994f874b265ed2e7c43f0bcd27b6ac (patch)
treea7b11de02bc213b279906aaa4aafc7d15ff09bac /src/DotNetOAuth/ChannelElements/OAuthChannel.cs
parent55c86fc27084af191bbb80fb91da34c24b945c3e (diff)
downloadDotNetOpenAuth-5cbd5d7edb994f874b265ed2e7c43f0bcd27b6ac.zip
DotNetOpenAuth-5cbd5d7edb994f874b265ed2e7c43f0bcd27b6ac.tar.gz
DotNetOpenAuth-5cbd5d7edb994f874b265ed2e7c43f0bcd27b6ac.tar.bz2
Removed the queue/dequeue methodology of queued responses. Now the methods that generate them return them.
Besides simplifying the API somewhat, this change allows for Consumer, ServiceProvider and Channel classes to be entirely threadsafe and reusable.
Diffstat (limited to 'src/DotNetOAuth/ChannelElements/OAuthChannel.cs')
-rw-r--r--src/DotNetOAuth/ChannelElements/OAuthChannel.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/DotNetOAuth/ChannelElements/OAuthChannel.cs b/src/DotNetOAuth/ChannelElements/OAuthChannel.cs
index 03db91e..951df05 100644
--- a/src/DotNetOAuth/ChannelElements/OAuthChannel.cs
+++ b/src/DotNetOAuth/ChannelElements/OAuthChannel.cs
@@ -208,10 +208,11 @@ namespace DotNetOAuth.ChannelElements {
/// are sent in the response stream in querystring style.
/// </summary>
/// <param name="response">The message to send as a response.</param>
+ /// <returns>The pending user agent redirect based message to be sent as an HttpResponse.</returns>
/// <remarks>
/// This method implements spec V1.0 section 5.3.
/// </remarks>
- protected override void SendDirectMessageResponse(IProtocolMessage response) {
+ protected override Response SendDirectMessageResponse(IProtocolMessage response) {
MessageSerializer serializer = MessageSerializer.Get(response.GetType());
var fields = serializer.Serialize(response);
string responseBody = MessagingUtilities.CreateQueryString(fields);
@@ -222,7 +223,7 @@ namespace DotNetOAuth.ChannelElements {
Status = HttpStatusCode.OK,
Headers = new System.Net.WebHeaderCollection(),
};
- this.QueueIndirectOrResponseMessage(encodedResponse);
+ return encodedResponse;
}
/// <summary>