diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-29 23:16:41 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-10-02 07:33:55 -0700 |
commit | 5cbd5d7edb994f874b265ed2e7c43f0bcd27b6ac (patch) | |
tree | a7b11de02bc213b279906aaa4aafc7d15ff09bac /src/DotNetOAuth/Consumer.cs | |
parent | 55c86fc27084af191bbb80fb91da34c24b945c3e (diff) | |
download | DotNetOpenAuth-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/Consumer.cs')
-rw-r--r-- | src/DotNetOAuth/Consumer.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/DotNetOAuth/Consumer.cs b/src/DotNetOAuth/Consumer.cs index ce61e60..bc50d1f 100644 --- a/src/DotNetOAuth/Consumer.cs +++ b/src/DotNetOAuth/Consumer.cs @@ -59,11 +59,6 @@ namespace DotNetOAuth { public ITokenManager TokenManager { get; private set; }
/// <summary>
- /// Gets the pending user agent redirect based message to be sent as an HttpResponse.
- /// </summary>
- public Response PendingRequest { get; private set; }
-
- /// <summary>
/// Gets or sets the object that processes <see cref="HttpWebRequest"/>s.
/// </summary>
/// <remarks>
@@ -86,7 +81,8 @@ namespace DotNetOAuth { /// User Agent to upon successful authorization.
/// </param>
/// <param name="extraParameters">Extra parameters to add to the request token message. Optional.</param>
- public void RequestUserAuthorization(Uri callback, IDictionary<string, string> extraParameters) {
+ /// <returns>The pending user agent redirect based message to be sent as an HttpResponse.</returns>
+ public Response RequestUserAuthorization(Uri callback, IDictionary<string, string> extraParameters) {
// Obtain an unauthorized request token.
var requestToken = new RequestTokenMessage(this.ServiceProvider.RequestTokenEndpoint) {
ConsumerKey = this.ConsumerKey,
@@ -101,8 +97,7 @@ namespace DotNetOAuth { Callback = callback,
RequestToken = requestTokenResponse.RequestToken,
};
- this.Channel.Send(requestAuthorization);
- this.PendingRequest = this.Channel.DequeueIndirectOrResponseMessage();
+ return this.Channel.Send(requestAuthorization);
}
/// <summary>
|