diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-03 07:20:01 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-03 07:20:01 -0800 |
commit | e38569da243fb331c46bfc2823dab749b5416327 (patch) | |
tree | e2d312777958271dfed83b4e73b57fe953245261 /src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs | |
parent | ae44be6fcfe656d7f8ff0bb6162c67cc06384884 (diff) | |
parent | 778328ec797299ed6aa01279b3ccbf1eb15258bd (diff) | |
download | DotNetOpenAuth-e38569da243fb331c46bfc2823dab749b5416327.zip DotNetOpenAuth-e38569da243fb331c46bfc2823dab749b5416327.tar.gz DotNetOpenAuth-e38569da243fb331c46bfc2823dab749b5416327.tar.bz2 |
Merge remote-tracking branch 'origin/v4.1' into v4.1
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs')
-rw-r--r-- | src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs index cc4e45f..0677f5a 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs @@ -135,7 +135,9 @@ namespace DotNetOpenAuth.OAuth2 { clientIdentifier); } - request.Credentials = this.credential ?? new NetworkCredential(clientIdentifier, this.clientSecret); + // HttpWebRequest ignores the Credentials property until the remote server returns a 401 Unauthorized. + // So we also set the HTTP Authorization request header directly. + OAuthUtilities.ApplyHttpBasicAuth(request.Headers, clientIdentifier, this.clientSecret); } } } |