diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-04-18 20:24:55 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-04-18 20:24:55 -0700 |
commit | 5cd3b789f3966dc386cf91aa5c988ad0155fdd5d (patch) | |
tree | 26bb97deedd9a23e028c44e9552326832b01c65d /src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs | |
parent | 2ddd19d9f037bebbbdc80d7de35ce4d899710859 (diff) | |
download | DotNetOpenAuth-5cd3b789f3966dc386cf91aa5c988ad0155fdd5d.zip DotNetOpenAuth-5cd3b789f3966dc386cf91aa5c988ad0155fdd5d.tar.gz DotNetOpenAuth-5cd3b789f3966dc386cf91aa5c988ad0155fdd5d.tar.bz2 |
StyleCop cleanup, and reversal of some code changes that were no longer necessary.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs')
-rw-r--r-- | src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs index 271a87e..2cfaede 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs @@ -53,23 +53,13 @@ namespace DotNetOpenAuth.OAuth2 { /// <summary> /// Gets or sets the identifier by which this client is known to the Authorization Server. /// </summary> - public string ClientIdentifier { - get { return this.OAuthChannel.ClientIdentifier; } - set { this.OAuthChannel.ClientIdentifier = value; } - } + public string ClientIdentifier { get; set; } /// <summary> /// Gets or sets the tool to use to apply client credentials to authenticated requests to the Authorization Server. /// </summary> /// <value>May be <c>null</c> if this client has no client secret.</value> - public ClientCredentialApplicator ClientCredentialApplicator { - get { return this.OAuthChannel.ClientCredentialApplicator; } - set { this.OAuthChannel.ClientCredentialApplicator = value; } - } - - internal IOAuth2ChannelWithClient OAuthChannel { - get { return (IOAuth2ChannelWithClient)this.Channel; } - } + public ClientCredentialApplicator ClientCredentialApplicator { get; set; } /// <summary> /// Adds the necessary HTTP Authorization header to an HTTP request for protected resources @@ -283,9 +273,18 @@ namespace DotNetOpenAuth.OAuth2 { } /// <summary> + /// Applies the default client authentication mechanism given a client secret. + /// </summary> + /// <param name="secret">The client secret. May be <c>null</c></param> + /// <returns>The client credential applicator.</returns> + protected static ClientCredentialApplicator DefaultSecretApplicator(string secret) { + return secret == null ? ClientCredentialApplicator.NoSecret() : ClientCredentialApplicator.SecretParameter(secret); + } + + /// <summary> /// Applies any applicable client credential to an authenticated outbound request to the authorization server. /// </summary> - /// <param name="request"></param> + /// <param name="request">The request to apply authentication information to.</param> protected void ApplyClientCredential(AuthenticatedClientRequestBase request) { Requires.NotNull(request, "request"); @@ -294,10 +293,6 @@ namespace DotNetOpenAuth.OAuth2 { } } - protected static ClientCredentialApplicator DefaultSecretApplicator(string secret) { - return secret == null ? ClientCredentialApplicator.NoSecret() : ClientCredentialApplicator.SecretParameter(secret); - } - /// <summary> /// Calculates the fraction of life remaining in an access token. /// </summary> |