OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 26 matching lines...) Expand all Loading... |
37 bool HttpAuthHandlerNTLM::AllowsDefaultCredentials() { | 37 bool HttpAuthHandlerNTLM::AllowsDefaultCredentials() { |
38 if (target_ == HttpAuth::AUTH_PROXY) | 38 if (target_ == HttpAuth::AUTH_PROXY) |
39 return true; | 39 return true; |
40 if (!url_security_manager_) | 40 if (!url_security_manager_) |
41 return false; | 41 return false; |
42 return url_security_manager_->CanUseDefaultCredentials(origin_); | 42 return url_security_manager_->CanUseDefaultCredentials(origin_); |
43 } | 43 } |
44 | 44 |
45 HttpAuthHandlerNTLM::Factory::Factory() | 45 HttpAuthHandlerNTLM::Factory::Factory() |
46 : max_token_length_(0), | 46 : max_token_length_(0), |
47 first_creation_(true), | |
48 is_unsupported_(false) { | 47 is_unsupported_(false) { |
49 } | 48 } |
50 | 49 |
51 HttpAuthHandlerNTLM::Factory::~Factory() { | 50 HttpAuthHandlerNTLM::Factory::~Factory() { |
52 } | 51 } |
53 | 52 |
54 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler( | 53 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler( |
55 HttpAuthChallengeTokenizer* challenge, | 54 HttpAuthChallengeTokenizer* challenge, |
56 HttpAuth::Target target, | 55 HttpAuth::Target target, |
57 const GURL& origin, | 56 const GURL& origin, |
(...skipping 16 matching lines...) Expand all Loading... |
74 scoped_ptr<HttpAuthHandler> tmp_handler( | 73 scoped_ptr<HttpAuthHandler> tmp_handler( |
75 new HttpAuthHandlerNTLM(sspi_library_.get(), max_token_length_, | 74 new HttpAuthHandlerNTLM(sspi_library_.get(), max_token_length_, |
76 url_security_manager())); | 75 url_security_manager())); |
77 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) | 76 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) |
78 return ERR_INVALID_RESPONSE; | 77 return ERR_INVALID_RESPONSE; |
79 handler->swap(tmp_handler); | 78 handler->swap(tmp_handler); |
80 return OK; | 79 return OK; |
81 } | 80 } |
82 | 81 |
83 } // namespace net | 82 } // namespace net |
OLD | NEW |