OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ntlm.h" | 5 #include "net/http/http_auth_handler_ntlm.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 // For gethostname | 8 // For gethostname |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 | 707 |
708 if (rv == OK) | 708 if (rv == OK) |
709 LogToken("out-token", *out_token, *out_token_len); | 709 LogToken("out-token", *out_token, *out_token_len); |
710 | 710 |
711 return rv; | 711 return rv; |
712 } | 712 } |
713 | 713 |
714 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler( | 714 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler( |
715 HttpAuthChallengeTokenizer* challenge, | 715 HttpAuthChallengeTokenizer* challenge, |
716 HttpAuth::Target target, | 716 HttpAuth::Target target, |
| 717 const HttpResponseInfo& response_info, |
717 const GURL& origin, | 718 const GURL& origin, |
718 CreateReason reason, | 719 CreateReason reason, |
719 int digest_nonce_count, | 720 int digest_nonce_count, |
720 const BoundNetLog& net_log, | 721 const BoundNetLog& net_log, |
721 scoped_ptr<HttpAuthHandler>* handler) { | 722 scoped_ptr<HttpAuthHandler>* handler) { |
722 if (reason == CREATE_PREEMPTIVE) | 723 if (reason == CREATE_PREEMPTIVE) |
723 return ERR_UNSUPPORTED_AUTH_SCHEME; | 724 return ERR_UNSUPPORTED_AUTH_SCHEME; |
724 // TODO(cbentzel): Move towards model of parsing in the factory | 725 // TODO(cbentzel): Move towards model of parsing in the factory |
725 // method and only constructing when valid. | 726 // method and only constructing when valid. |
726 // NOTE: Default credentials are not supported for the portable implementation | 727 // NOTE: Default credentials are not supported for the portable implementation |
727 // of NTLM. | 728 // of NTLM. |
728 scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM); | 729 scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM); |
729 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) | 730 if (!tmp_handler->InitFromChallenge(challenge, target, response_info, origin, |
| 731 net_log)) |
730 return ERR_INVALID_RESPONSE; | 732 return ERR_INVALID_RESPONSE; |
731 handler->swap(tmp_handler); | 733 handler->swap(tmp_handler); |
732 return OK; | 734 return OK; |
733 } | 735 } |
734 | 736 |
735 } // namespace net | 737 } // namespace net |
OLD | NEW |