Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: net/http/http_auth_handler_negotiate.cc

Issue 10916272: Remove HttpAuth::Scheme enum in favor of a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_auth_handler_mock.cc ('k') | net/http/http_auth_handler_ntlm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_auth_handler_negotiate.h" 5 #include "net/http/http_auth_handler_negotiate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 // GSSAPI does not provide a way to enter username/password to 197 // GSSAPI does not provide a way to enter username/password to
198 // obtain a TGT. If the default credentials are not allowed for 198 // obtain a TGT. If the default credentials are not allowed for
199 // a particular site (based on whitelist), fall back to a 199 // a particular site (based on whitelist), fall back to a
200 // different scheme. 200 // different scheme.
201 if (!AllowsDefaultCredentials()) 201 if (!AllowsDefaultCredentials())
202 return false; 202 return false;
203 #endif 203 #endif
204 if (CanDelegate()) 204 if (CanDelegate())
205 auth_system_.Delegate(); 205 auth_system_.Delegate();
206 auth_scheme_ = HttpAuth::AUTH_SCHEME_NEGOTIATE; 206 auth_scheme_ = "negotiate";
207 score_ = 4; 207 score_ = 4;
208 properties_ = ENCRYPTS_IDENTITY | IS_CONNECTION_BASED; 208 properties_ = ENCRYPTS_IDENTITY | IS_CONNECTION_BASED;
209 HttpAuth::AuthorizationResult auth_result = 209 HttpAuth::AuthorizationResult auth_result =
210 auth_system_.ParseChallenge(challenge); 210 auth_system_.ParseChallenge(challenge);
211 return (auth_result == HttpAuth::AUTHORIZATION_RESULT_ACCEPT); 211 return (auth_result == HttpAuth::AUTHORIZATION_RESULT_ACCEPT);
212 } 212 }
213 213
214 int HttpAuthHandlerNegotiate::GenerateAuthTokenImpl( 214 int HttpAuthHandlerNegotiate::GenerateAuthTokenImpl(
215 const AuthCredentials* credentials, const HttpRequestInfo* request, 215 const AuthCredentials* credentials, const HttpRequestInfo* request,
216 const CompletionCallback& callback, std::string* auth_token) { 216 const CompletionCallback& callback, std::string* auth_token) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 bool HttpAuthHandlerNegotiate::CanDelegate() const { 330 bool HttpAuthHandlerNegotiate::CanDelegate() const {
331 // TODO(cbentzel): Should delegation be allowed on proxies? 331 // TODO(cbentzel): Should delegation be allowed on proxies?
332 if (target_ == HttpAuth::AUTH_PROXY) 332 if (target_ == HttpAuth::AUTH_PROXY)
333 return false; 333 return false;
334 if (!url_security_manager_) 334 if (!url_security_manager_)
335 return false; 335 return false;
336 return url_security_manager_->CanDelegate(origin_); 336 return url_security_manager_->CanDelegate(origin_);
337 } 337 }
338 338
339 } // namespace net 339 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_mock.cc ('k') | net/http/http_auth_handler_ntlm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698