summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-03-01 22:00:51 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-03-01 23:19:24 -0800
commit1bd4984eee2220622b90cbedf8fc2cdb72bbf98b (patch)
tree213217e9da0d31d7fb6ef7fc993e5cc3ba5113c2 /src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs
parent862d9349ecf31b58e65072f91a5ee1956c31ba4b (diff)
downloadDotNetOpenAuth-1bd4984eee2220622b90cbedf8fc2cdb72bbf98b.zip
DotNetOpenAuth-1bd4984eee2220622b90cbedf8fc2cdb72bbf98b.tar.gz
DotNetOpenAuth-1bd4984eee2220622b90cbedf8fc2cdb72bbf98b.tar.bz2
Added some missing comments.
Diffstat (limited to 'src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs')
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs
index e592c05..35bd490 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs
@@ -32,6 +32,11 @@ namespace DotNetOpenAuth.AspNet.Clients {
_appSecret = appSecret;
}
+ /// <summary>
+ /// Gets the full url pointing to the login page for this client. The url should include the
+ /// specified return url so that when the login completes, user is redirected back to that url.
+ /// </summary>
+ /// <param name="returnUrl">The return URL.</param>
protected override Uri GetServiceLoginUrl(Uri returnUrl) {
var builder = new UriBuilder(AuthorizationEndpoint);
MessagingUtilities.AppendQueryArgs(builder,
@@ -46,6 +51,11 @@ namespace DotNetOpenAuth.AspNet.Clients {
return builder.Uri;
}
+ /// <summary>
+ /// Queries the access token from the specified authorization code.
+ /// </summary>
+ /// <param name="returnUrl">The return URL.</param>
+ /// <param name="authorizationCode">The authorization code.</param>
protected override string QueryAccessToken(Uri returnUrl, string authorizationCode) {
var builder = new StringBuilder();
builder.AppendFormat("client_id={0}", _appId);
@@ -78,6 +88,14 @@ namespace DotNetOpenAuth.AspNet.Clients {
return null;
}
+ /// <summary>
+ /// Given the access token, gets the logged-in user's data. The returned dictionary must include
+ /// two keys 'id', and 'username'.
+ /// </summary>
+ /// <param name="accessToken">The access token of the current user.</param>
+ /// <returns>
+ /// A dictionary contains key-value pairs of user data
+ /// </returns>
protected override IDictionary<string, string> GetUserData(string accessToken) {
WindowsLiveUserData graph;
var request = WebRequest.Create("https://apis.live.net/v5.0/me?access_token=" + Uri.EscapeDataString(accessToken));