diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-01 22:55:03 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-01 23:19:26 -0800 |
commit | 198bffe042a3650095b27bed29d0f8c98bc5c926 (patch) | |
tree | bc1b2178b73d4303221ac48d320c758751abe5e9 /src/DotNetOpenAuth.AspNet/Clients/OAuth/DotNetOpenAuthWebConsumer.cs | |
parent | 6bc4c6db7529501e8a2c0b7fa54a24fb8e4dbf42 (diff) | |
download | DotNetOpenAuth-198bffe042a3650095b27bed29d0f8c98bc5c926.zip DotNetOpenAuth-198bffe042a3650095b27bed29d0f8c98bc5c926.tar.gz DotNetOpenAuth-198bffe042a3650095b27bed29d0f8c98bc5c926.tar.bz2 |
ReSharper code cleanup to help get this AspNet contribution into StyleCop compliance.
Diffstat (limited to 'src/DotNetOpenAuth.AspNet/Clients/OAuth/DotNetOpenAuthWebConsumer.cs')
-rw-r--r-- | src/DotNetOpenAuth.AspNet/Clients/OAuth/DotNetOpenAuthWebConsumer.cs | 72 |
1 files changed, 63 insertions, 9 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth/DotNetOpenAuthWebConsumer.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth/DotNetOpenAuthWebConsumer.cs index 4dc3dcc..8edbeed 100644 --- a/src/DotNetOpenAuth.AspNet/Clients/OAuth/DotNetOpenAuthWebConsumer.cs +++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth/DotNetOpenAuthWebConsumer.cs @@ -13,9 +13,34 @@ namespace DotNetOpenAuth.AspNet.Clients { using DotNetOpenAuth.OAuth.ChannelElements; using DotNetOpenAuth.OAuth.Messages; + /// <summary> + /// The dot net open auth web consumer. + /// </summary> public class DotNetOpenAuthWebConsumer : IOAuthWebWorker { + #region Constants and Fields + + /// <summary> + /// The _web consumer. + /// </summary> private readonly WebConsumer _webConsumer; + #endregion + + #region Constructors and Destructors + + /// <summary> + /// Initializes a new instance of the <see cref="DotNetOpenAuthWebConsumer"/> class. + /// </summary> + /// <param name="serviceDescription"> + /// The service description. + /// </param> + /// <param name="tokenManager"> + /// The token manager. + /// </param> + /// <exception cref="ArgumentNullException"> + /// </exception> + /// <exception cref="ArgumentNullException"> + /// </exception> public DotNetOpenAuthWebConsumer(ServiceProviderDescription serviceDescription, IConsumerTokenManager tokenManager) { if (serviceDescription == null) { throw new ArgumentNullException("consumer"); @@ -25,21 +50,50 @@ namespace DotNetOpenAuth.AspNet.Clients { throw new ArgumentNullException("tokenManager"); } - _webConsumer = new WebConsumer(serviceDescription, tokenManager); + this._webConsumer = new WebConsumer(serviceDescription, tokenManager); } - public void RequestAuthentication(Uri callback) { - var redirectParameters = new Dictionary<string, string>() { { "force_login", "false" } }; - UserAuthorizationRequest request = _webConsumer.PrepareRequestUserAuthorization(callback, null, redirectParameters); - _webConsumer.Channel.PrepareResponse(request).Send(); + #endregion + + #region Public Methods and Operators + + /// <summary> + /// The prepare authorized request. + /// </summary> + /// <param name="profileEndpoint"> + /// The profile endpoint. + /// </param> + /// <param name="accessToken"> + /// The access token. + /// </param> + /// <returns> + /// </returns> + public HttpWebRequest PrepareAuthorizedRequest(MessageReceivingEndpoint profileEndpoint, string accessToken) { + return this._webConsumer.PrepareAuthorizedRequest(profileEndpoint, accessToken); } + /// <summary> + /// The process user authorization. + /// </summary> + /// <returns> + /// </returns> public AuthorizedTokenResponse ProcessUserAuthorization() { - return _webConsumer.ProcessUserAuthorization(); + return this._webConsumer.ProcessUserAuthorization(); } - public HttpWebRequest PrepareAuthorizedRequest(MessageReceivingEndpoint profileEndpoint, string accessToken) { - return _webConsumer.PrepareAuthorizedRequest(profileEndpoint, accessToken); + /// <summary> + /// The request authentication. + /// </summary> + /// <param name="callback"> + /// The callback. + /// </param> + public void RequestAuthentication(Uri callback) { + var redirectParameters = new Dictionary<string, string> { { "force_login", "false" } }; + UserAuthorizationRequest request = this._webConsumer.PrepareRequestUserAuthorization( + callback, null, redirectParameters); + this._webConsumer.Channel.PrepareResponse(request).Send(); } + + #endregion } -}
\ No newline at end of file +} |