diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-10 11:41:47 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-10 11:41:47 -0800 |
commit | abd2769d72e52def7544ac080cee4758bfc8e592 (patch) | |
tree | 34c22abbe6260d387b1a7c851d286c5b50fcbe33 /src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs | |
parent | 5bd70111d5740844656aaed12206c9f28dd25923 (diff) | |
download | DotNetOpenAuth-abd2769d72e52def7544ac080cee4758bfc8e592.zip DotNetOpenAuth-abd2769d72e52def7544ac080cee4758bfc8e592.tar.gz DotNetOpenAuth-abd2769d72e52def7544ac080cee4758bfc8e592.tar.bz2 |
StyleCop fixes on AspNet project.
Diffstat (limited to 'src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs')
-rw-r--r-- | src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs index 2d12202..f4ad20b 100644 --- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs +++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs @@ -32,12 +32,12 @@ namespace DotNetOpenAuth.AspNet.Clients { /// <summary> /// The _app id. /// </summary> - private readonly string _appId; + private readonly string appId; /// <summary> /// The _app secret. /// </summary> - private readonly string _appSecret; + private readonly string appSecret; #endregion @@ -52,17 +52,13 @@ namespace DotNetOpenAuth.AspNet.Clients { /// <param name="appSecret"> /// The app secret. /// </param> - /// <exception cref="ArgumentException"> - /// </exception> - /// <exception cref="ArgumentException"> - /// </exception> public FacebookClient(string appId, string appSecret) : base("facebook") { Requires.NotNullOrEmpty(appId, "appId"); Requires.NotNullOrEmpty(appSecret, "appSecret"); - this._appId = appId; - this._appSecret = appSecret; + this.appId = appId; + this.appSecret = appSecret; } #endregion @@ -75,13 +71,12 @@ namespace DotNetOpenAuth.AspNet.Clients { /// <param name="returnUrl"> /// The return url. /// </param> - /// <returns> - /// </returns> + /// <returns>An absolute URI.</returns> protected override Uri GetServiceLoginUrl(Uri returnUrl) { // Note: Facebook doesn't like us to url-encode the redirect_uri value var builder = new UriBuilder(AuthorizationEndpoint); builder.AppendQueryArgs( - new Dictionary<string, string> { { "client_id", this._appId }, { "redirect_uri", returnUrl.AbsoluteUri }, }); + new Dictionary<string, string> { { "client_id", this.appId }, { "redirect_uri", returnUrl.AbsoluteUri }, }); return builder.Uri; } @@ -91,8 +86,7 @@ namespace DotNetOpenAuth.AspNet.Clients { /// <param name="accessToken"> /// The access token. /// </param> - /// <returns> - /// </returns> + /// <returns>A dictionary of profile data.</returns> protected override IDictionary<string, string> GetUserData(string accessToken) { FacebookGraphData graphData; var request = @@ -116,7 +110,7 @@ namespace DotNetOpenAuth.AspNet.Clients { } /// <summary> - /// The query access token. + /// Obtains an access token given an authorization code and callback URL. /// </summary> /// <param name="returnUrl"> /// The return url. @@ -125,17 +119,17 @@ namespace DotNetOpenAuth.AspNet.Clients { /// The authorization code. /// </param> /// <returns> - /// The query access token. + /// The access token. /// </returns> protected override string QueryAccessToken(Uri returnUrl, string authorizationCode) { // Note: Facebook doesn't like us to url-encode the redirect_uri value var builder = new UriBuilder(TokenEndpoint); builder.AppendQueryArgs( new Dictionary<string, string> { - { "client_id", this._appId }, - { "redirect_uri", returnUrl.AbsoluteUri }, - { "client_secret", this._appSecret }, - { "code", authorizationCode }, + { "client_id", this.appId }, + { "redirect_uri", returnUrl.AbsoluteUri }, + { "client_secret", this.appSecret }, + { "code", authorizationCode }, }); using (WebClient client = new WebClient()) { |