| 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 // See "SSPI Sample Application" at | 5 // See "SSPI Sample Application" at |
| 6 // http://msdn.microsoft.com/en-us/library/aa918273.aspx | 6 // http://msdn.microsoft.com/en-us/library/aa918273.aspx |
| 7 // and "NTLM Security Support Provider" at | 7 // and "NTLM Security Support Provider" at |
| 8 // http://msdn.microsoft.com/en-us/library/aa923611.aspx. | 8 // http://msdn.microsoft.com/en-us/library/aa923611.aspx. |
| 9 | 9 |
| 10 #include "net/http/http_auth_handler_ntlm.h" | 10 #include "net/http/http_auth_handler_ntlm.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 HttpAuthHandlerNTLM::~HttpAuthHandlerNTLM() { | 29 HttpAuthHandlerNTLM::~HttpAuthHandlerNTLM() { |
| 30 } | 30 } |
| 31 | 31 |
| 32 // Require identity on first pass instead of second. | 32 // Require identity on first pass instead of second. |
| 33 bool HttpAuthHandlerNTLM::NeedsIdentity() { | 33 bool HttpAuthHandlerNTLM::NeedsIdentity() { |
| 34 return auth_sspi_.NeedsIdentity(); | 34 return auth_sspi_.NeedsIdentity(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool HttpAuthHandlerNTLM::IsFinalRound() { | |
| 38 return auth_sspi_.IsFinalRound(); | |
| 39 } | |
| 40 | |
| 41 bool HttpAuthHandlerNTLM::AllowsDefaultCredentials() { | 37 bool HttpAuthHandlerNTLM::AllowsDefaultCredentials() { |
| 42 if (target_ == HttpAuth::AUTH_PROXY) | 38 if (target_ == HttpAuth::AUTH_PROXY) |
| 43 return true; | 39 return true; |
| 44 if (!url_security_manager_) | 40 if (!url_security_manager_) |
| 45 return false; | 41 return false; |
| 46 return url_security_manager_->CanUseDefaultCredentials(origin_); | 42 return url_security_manager_->CanUseDefaultCredentials(origin_); |
| 47 } | 43 } |
| 48 | 44 |
| 49 HttpAuthHandlerNTLM::Factory::Factory() | 45 HttpAuthHandlerNTLM::Factory::Factory() |
| 50 : max_token_length_(0), | 46 : max_token_length_(0), |
| (...skipping 28 matching lines...) Expand all Loading... |
| 79 scoped_ptr<HttpAuthHandler> tmp_handler( | 75 scoped_ptr<HttpAuthHandler> tmp_handler( |
| 80 new HttpAuthHandlerNTLM(sspi_library_, max_token_length_, | 76 new HttpAuthHandlerNTLM(sspi_library_, max_token_length_, |
| 81 url_security_manager())); | 77 url_security_manager())); |
| 82 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) | 78 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) |
| 83 return ERR_INVALID_RESPONSE; | 79 return ERR_INVALID_RESPONSE; |
| 84 handler->swap(tmp_handler); | 80 handler->swap(tmp_handler); |
| 85 return OK; | 81 return OK; |
| 86 } | 82 } |
| 87 | 83 |
| 88 } // namespace net | 84 } // namespace net |
| OLD | NEW |