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