| 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 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
| 6 #define NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ | 6 #define NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "net/base/address_list.h" | 13 #include "net/base/address_list.h" |
| 14 #include "net/base/net_api.h" | 14 #include "net/base/net_export.h" |
| 15 #include "net/http/http_auth_handler.h" | 15 #include "net/http/http_auth_handler.h" |
| 16 #include "net/http/http_auth_handler_factory.h" | 16 #include "net/http/http_auth_handler_factory.h" |
| 17 | 17 |
| 18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
| 19 #include "net/http/http_auth_sspi_win.h" | 19 #include "net/http/http_auth_sspi_win.h" |
| 20 #elif defined(OS_POSIX) | 20 #elif defined(OS_POSIX) |
| 21 #include "net/http/http_auth_gssapi_posix.h" | 21 #include "net/http/http_auth_gssapi_posix.h" |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 namespace net { | 24 namespace net { |
| 25 | 25 |
| 26 class HostResolver; | 26 class HostResolver; |
| 27 class SingleRequestHostResolver; | 27 class SingleRequestHostResolver; |
| 28 class URLSecurityManager; | 28 class URLSecurityManager; |
| 29 | 29 |
| 30 // Handler for WWW-Authenticate: Negotiate protocol. | 30 // Handler for WWW-Authenticate: Negotiate protocol. |
| 31 // | 31 // |
| 32 // See http://tools.ietf.org/html/rfc4178 and http://tools.ietf.org/html/rfc4559 | 32 // See http://tools.ietf.org/html/rfc4178 and http://tools.ietf.org/html/rfc4559 |
| 33 // for more information about the protocol. | 33 // for more information about the protocol. |
| 34 | 34 |
| 35 class NET_TEST HttpAuthHandlerNegotiate : public HttpAuthHandler { | 35 class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler { |
| 36 public: | 36 public: |
| 37 #if defined(OS_WIN) | 37 #if defined(OS_WIN) |
| 38 typedef SSPILibrary AuthLibrary; | 38 typedef SSPILibrary AuthLibrary; |
| 39 typedef HttpAuthSSPI AuthSystem; | 39 typedef HttpAuthSSPI AuthSystem; |
| 40 #elif defined(OS_POSIX) | 40 #elif defined(OS_POSIX) |
| 41 typedef GSSAPILibrary AuthLibrary; | 41 typedef GSSAPILibrary AuthLibrary; |
| 42 typedef HttpAuthGSSAPI AuthSystem; | 42 typedef HttpAuthGSSAPI AuthSystem; |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 class NET_TEST Factory : public HttpAuthHandlerFactory { | 45 class NET_EXPORT_PRIVATE Factory : public HttpAuthHandlerFactory { |
| 46 public: | 46 public: |
| 47 Factory(); | 47 Factory(); |
| 48 virtual ~Factory(); | 48 virtual ~Factory(); |
| 49 | 49 |
| 50 // |disable_cname_lookup()| and |set_disable_cname_lookup()| get/set whether | 50 // |disable_cname_lookup()| and |set_disable_cname_lookup()| get/set whether |
| 51 // the auth handlers generated by this factory should skip looking up the | 51 // the auth handlers generated by this factory should skip looking up the |
| 52 // canonical DNS name of the the host that they are authenticating to when | 52 // canonical DNS name of the the host that they are authenticating to when |
| 53 // generating the SPN. The default value is false. | 53 // generating the SPN. The default value is false. |
| 54 bool disable_cname_lookup() const { return disable_cname_lookup_; } | 54 bool disable_cname_lookup() const { return disable_cname_lookup_; } |
| 55 void set_disable_cname_lookup(bool disable_cname_lookup) { | 55 void set_disable_cname_lookup(bool disable_cname_lookup) { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 std::string* auth_token_; | 162 std::string* auth_token_; |
| 163 | 163 |
| 164 State next_state_; | 164 State next_state_; |
| 165 | 165 |
| 166 const URLSecurityManager* url_security_manager_; | 166 const URLSecurityManager* url_security_manager_; |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 } // namespace net | 169 } // namespace net |
| 170 | 170 |
| 171 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ | 171 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
| OLD | NEW |