summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-03-04 13:54:33 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2013-03-04 13:54:33 -0800
commit36bbbea5002c889558a67c380e46dff668251b25 (patch)
tree87721c7f13cfd27b75f7132b71549688b55eb14a /src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs
parentfd85211bfc50805d740392bfc6770df7c6f4c7d0 (diff)
downloadDotNetOpenAuth-36bbbea5002c889558a67c380e46dff668251b25.zip
DotNetOpenAuth-36bbbea5002c889558a67c380e46dff668251b25.tar.gz
DotNetOpenAuth-36bbbea5002c889558a67c380e46dff668251b25.tar.bz2
Switched Channel to receiving messages via HttpRequestMessage as well.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs')
-rw-r--r--src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs
index 0476521..c8eb69d 100644
--- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs
+++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs
@@ -135,13 +135,10 @@ namespace DotNetOpenAuth.OAuth2 {
RequiresEx.ValidState(!string.IsNullOrEmpty(this.ClientIdentifier), Strings.RequiredPropertyNotYetPreset, "ClientIdentifier");
RequiresEx.ValidState(this.ClientCredentialApplicator != null, Strings.RequiredPropertyNotYetPreset, "ClientCredentialApplicator");
- if (request == null) {
- request = this.Channel.GetRequestFromContext();
- }
-
- var response = await this.Channel.TryReadFromRequestAsync<IMessageWithClientState>(cancellationToken, request);
+ request = request ?? this.Channel.GetRequestFromContext();
+ var response = await this.Channel.TryReadFromRequestAsync<IMessageWithClientState>(request.AsHttpRequestMessage(), cancellationToken);
if (response != null) {
- Uri callback = MessagingUtilities.StripMessagePartsFromQueryString(request.GetPublicFacingUrl(), this.Channel.MessageDescriptions.Get(response));
+ Uri callback = request.GetPublicFacingUrl().StripMessagePartsFromQueryString(this.Channel.MessageDescriptions.Get(response));
IAuthorizationState authorizationState;
if (this.AuthorizationTracker != null) {
authorizationState = this.AuthorizationTracker.GetAuthorizationState(callback, response.ClientState);