| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 // GSSAPI does not provide a way to enter username/password to | 87 // GSSAPI does not provide a way to enter username/password to |
| 88 // obtain a TGT. If the default credentials are not allowed for | 88 // obtain a TGT. If the default credentials are not allowed for |
| 89 // a particular site (based on whitelist), fall back to a | 89 // a particular site (based on whitelist), fall back to a |
| 90 // different scheme. | 90 // different scheme. |
| 91 if (!AllowsDefaultCredentials()) | 91 if (!AllowsDefaultCredentials()) |
| 92 return false; | 92 return false; |
| 93 #endif | 93 #endif |
| 94 if (CanDelegate()) | 94 if (CanDelegate()) |
| 95 auth_system_.Delegate(); | 95 auth_system_.Delegate(); |
| 96 auth_scheme_ = AUTH_SCHEME_NEGOTIATE; | 96 auth_scheme_ = HttpAuth::AUTH_SCHEME_NEGOTIATE; |
| 97 scheme_ = "negotiate"; | |
| 98 score_ = 4; | 97 score_ = 4; |
| 99 properties_ = ENCRYPTS_IDENTITY | IS_CONNECTION_BASED; | 98 properties_ = ENCRYPTS_IDENTITY | IS_CONNECTION_BASED; |
| 100 HttpAuth::AuthorizationResult auth_result = | 99 HttpAuth::AuthorizationResult auth_result = |
| 101 auth_system_.ParseChallenge(challenge); | 100 auth_system_.ParseChallenge(challenge); |
| 102 return (auth_result == HttpAuth::AUTHORIZATION_RESULT_ACCEPT); | 101 return (auth_result == HttpAuth::AUTHORIZATION_RESULT_ACCEPT); |
| 103 } | 102 } |
| 104 | 103 |
| 105 HttpAuth::AuthorizationResult HttpAuthHandlerNegotiate::HandleAnotherChallenge( | 104 HttpAuth::AuthorizationResult HttpAuthHandlerNegotiate::HandleAnotherChallenge( |
| 106 HttpAuth::ChallengeTokenizer* challenge) { | 105 HttpAuth::ChallengeTokenizer* challenge) { |
| 107 return auth_system_.ParseChallenge(challenge); | 106 return auth_system_.ParseChallenge(challenge); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 resolver_, disable_cname_lookup_, | 323 resolver_, disable_cname_lookup_, |
| 325 use_port_)); | 324 use_port_)); |
| 326 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) | 325 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) |
| 327 return ERR_INVALID_RESPONSE; | 326 return ERR_INVALID_RESPONSE; |
| 328 handler->swap(tmp_handler); | 327 handler->swap(tmp_handler); |
| 329 return OK; | 328 return OK; |
| 330 #endif | 329 #endif |
| 331 } | 330 } |
| 332 | 331 |
| 333 } // namespace net | 332 } // namespace net |
| OLD | NEW |