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 27 matching lines...) Expand all Loading... |
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), | 47 first_creation_(true), |
48 is_unsupported_(false), | 48 is_unsupported_(false) { |
49 sspi_library_(NULL) { | |
50 } | 49 } |
51 | 50 |
52 HttpAuthHandlerNTLM::Factory::~Factory() { | 51 HttpAuthHandlerNTLM::Factory::~Factory() { |
53 } | 52 } |
54 | 53 |
55 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler( | 54 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler( |
56 HttpAuth::ChallengeTokenizer* challenge, | 55 HttpAuth::ChallengeTokenizer* challenge, |
57 HttpAuth::Target target, | 56 HttpAuth::Target target, |
58 const GURL& origin, | 57 const GURL& origin, |
59 CreateReason reason, | 58 CreateReason reason, |
(...skipping 15 matching lines...) Expand all Loading... |
75 scoped_ptr<HttpAuthHandler> tmp_handler( | 74 scoped_ptr<HttpAuthHandler> tmp_handler( |
76 new HttpAuthHandlerNTLM(sspi_library_.get(), max_token_length_, | 75 new HttpAuthHandlerNTLM(sspi_library_.get(), max_token_length_, |
77 url_security_manager())); | 76 url_security_manager())); |
78 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) | 77 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) |
79 return ERR_INVALID_RESPONSE; | 78 return ERR_INVALID_RESPONSE; |
80 handler->swap(tmp_handler); | 79 handler->swap(tmp_handler); |
81 return OK; | 80 return OK; |
82 } | 81 } |
83 | 82 |
84 } // namespace net | 83 } // namespace net |
OLD | NEW |