summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-05-31 13:19:28 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-05-31 13:19:28 -0700
commite693105593797bd4b0c05b613236fd3198fddbc6 (patch)
tree9155327cb7d5f6447f3581ef90c3b09e305c097e /src
parentbb18b22fdcaffdcc61b2a46eef31c38653a847be (diff)
downloadDotNetOpenAuth-e693105593797bd4b0c05b613236fd3198fddbc6.zip
DotNetOpenAuth-e693105593797bd4b0c05b613236fd3198fddbc6.tar.gz
DotNetOpenAuth-e693105593797bd4b0c05b613236fd3198fddbc6.tar.bz2
The access token is now obtainable now. Woot.
Now to make the access token worth something... :)
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/OAuthWrap/ChannelElements/OAuthWrapAuthorizationServerChannel.cs3
-rw-r--r--src/DotNetOpenAuth/OAuthWrap/ChannelElements/WebAppVerificationCodeBindingElement.cs2
-rw-r--r--src/DotNetOpenAuth/OAuthWrap/Messages/WebServer/WebAppAccessTokenRequest.cs3
3 files changed, 8 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth/OAuthWrap/ChannelElements/OAuthWrapAuthorizationServerChannel.cs b/src/DotNetOpenAuth/OAuthWrap/ChannelElements/OAuthWrapAuthorizationServerChannel.cs
index 336f582..aa6e1be 100644
--- a/src/DotNetOpenAuth/OAuthWrap/ChannelElements/OAuthWrapAuthorizationServerChannel.cs
+++ b/src/DotNetOpenAuth/OAuthWrap/ChannelElements/OAuthWrapAuthorizationServerChannel.cs
@@ -70,7 +70,10 @@ namespace DotNetOpenAuth.OAuthWrap.ChannelElements {
Contract.Requires<ArgumentNullException>(request != null, "request");
var response = new AccessTokenSuccessResponse(request) {
+ Scope = request.Scope,
// TODO: code here to initialize the response
+ AccessToken = "TODO",
+ RefreshToken = "TODO",
};
return response;
diff --git a/src/DotNetOpenAuth/OAuthWrap/ChannelElements/WebAppVerificationCodeBindingElement.cs b/src/DotNetOpenAuth/OAuthWrap/ChannelElements/WebAppVerificationCodeBindingElement.cs
index 31639f3..125a448 100644
--- a/src/DotNetOpenAuth/OAuthWrap/ChannelElements/WebAppVerificationCodeBindingElement.cs
+++ b/src/DotNetOpenAuth/OAuthWrap/ChannelElements/WebAppVerificationCodeBindingElement.cs
@@ -109,6 +109,8 @@ namespace DotNetOpenAuth.OAuthWrap.ChannelElements {
throw new ReplayedMessageException(message);
}
+ request.Scope = verificationCode.Scope;
+
return MessageProtections.None;
}
diff --git a/src/DotNetOpenAuth/OAuthWrap/Messages/WebServer/WebAppAccessTokenRequest.cs b/src/DotNetOpenAuth/OAuthWrap/Messages/WebServer/WebAppAccessTokenRequest.cs
index 86404ba..d9d482d 100644
--- a/src/DotNetOpenAuth/OAuthWrap/Messages/WebServer/WebAppAccessTokenRequest.cs
+++ b/src/DotNetOpenAuth/OAuthWrap/Messages/WebServer/WebAppAccessTokenRequest.cs
@@ -45,6 +45,9 @@ namespace DotNetOpenAuth.OAuthWrap.Messages {
Contract.Requires<ArgumentNullException>(authorizationServer != null);
Contract.Requires<ArgumentException>(authorizationServer.Version != null);
Contract.Requires<ArgumentException>(authorizationServer.TokenEndpoint != null);
+
+ // We prefer URL encoding of the data.
+ this.Format = ResponseFormat.Form;
}
/// <summary>