diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 18:44:58 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 18:44:58 +0000 |
commit | f3cf980ca36d5b557b626d1bba4db6ded3ab2b77 (patch) | |
tree | 74028618ccef405480ff6da6a9d0d8c80a8fda7f /net/http/http_auth_sspi_win.cc | |
parent | 7f5969dda833a858bc946ca59ba0a9afbee2bc89 (diff) | |
download | chromium_src-f3cf980ca36d5b557b626d1bba4db6ded3ab2b77.zip chromium_src-f3cf980ca36d5b557b626d1bba4db6ded3ab2b77.tar.gz chromium_src-f3cf980ca36d5b557b626d1bba4db6ded3ab2b77.tar.bz2 |
Use AuthCredentials throughout the network stack instead of username/password.
This is a refactor only - no behavior change should happen.
Review URL: http://codereview.chromium.org/8340026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_sspi_win.cc')
-rw-r--r-- | net/http/http_auth_sspi_win.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/net/http/http_auth_sspi_win.cc b/net/http/http_auth_sspi_win.cc index d07ce4c..f4cbe9d 100644 --- a/net/http/http_auth_sspi_win.cc +++ b/net/http/http_auth_sspi_win.cc @@ -254,15 +254,12 @@ HttpAuth::AuthorizationResult HttpAuthSSPI::ParseChallenge( return HttpAuth::AUTHORIZATION_RESULT_ACCEPT; } -int HttpAuthSSPI::GenerateAuthToken(const string16* username, - const string16* password, +int HttpAuthSSPI::GenerateAuthToken(const AuthCredentials* credentials, const std::wstring& spn, std::string* auth_token) { - DCHECK((username == NULL) == (password == NULL)); - // Initial challenge. if (!SecIsValidHandle(&cred_)) { - int rv = OnFirstRound(username, password); + int rv = OnFirstRound(credentials); if (rv != OK) return rv; } @@ -294,17 +291,15 @@ int HttpAuthSSPI::GenerateAuthToken(const string16* username, return OK; } -int HttpAuthSSPI::OnFirstRound(const string16* username, - const string16* password) { - DCHECK((username == NULL) == (password == NULL)); +int HttpAuthSSPI::OnFirstRound(const AuthCredentials* credentials) { DCHECK(!SecIsValidHandle(&cred_)); int rv = OK; - if (username) { + if (credentials) { string16 domain; string16 user; - SplitDomainAndUser(*username, &domain, &user); + SplitDomainAndUser(credentials->username(), &domain, &user); rv = AcquireExplicitCredentials(library_, security_package_, domain, - user, *password, &cred_); + user, credentials->password(), &cred_); if (rv != OK) return rv; } else { |