Chromium Code Reviews| 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_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_H_ |
| 6 #define NET_HTTP_HTTP_AUTH_H_ | 6 #define NET_HTTP_HTTP_AUTH_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "net/base/auth.h" | 12 #include "net/base/auth.h" |
| 13 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
| 14 #include "net/http/http_util.h" | 14 #include "net/http/http_util.h" |
| 15 | 15 |
| 16 template <class T> class scoped_refptr; | 16 template <class T> class scoped_refptr; |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 class BoundNetLog; | 20 class BoundNetLog; |
| 21 class HttpAuthHandler; | 21 class HttpAuthHandler; |
| 22 class HttpAuthHandlerFactory; | 22 class HttpAuthHandlerFactory; |
| 23 class HttpResponseHeaders; | 23 class HttpResponseHeaders; |
| 24 | 24 |
| 25 // Auth scheme names. | |
| 26 const char kBasicAuthScheme[] = "basic"; | |
|
asanka
2015/11/04 16:05:44
These constants have internal linkage (see http://
aberent
2015/11/06 13:57:34
Moved to separate header and source files. As disc
| |
| 27 const char kDigestAuthScheme[] = "digest"; | |
| 28 const char kNtlmAuthScheme[] = "ntlm"; | |
| 29 const char kNegotiateAuthScheme[] = "negotiate"; | |
| 30 const char kSpdyProxyAuthScheme[] = "spdyproxy"; | |
| 31 const char kMockAuthScheme[] = "mock"; | |
| 32 | |
| 25 // Utility class for http authentication. | 33 // Utility class for http authentication. |
| 26 class NET_EXPORT_PRIVATE HttpAuth { | 34 class NET_EXPORT_PRIVATE HttpAuth { |
| 27 public: | 35 public: |
| 28 // Http authentication can be done the the proxy server, origin server, | 36 // Http authentication can be done the the proxy server, origin server, |
| 29 // or both. This enum tracks who the target is. | 37 // or both. This enum tracks who the target is. |
| 30 enum Target { | 38 enum Target { |
| 31 AUTH_NONE = -1, | 39 AUTH_NONE = -1, |
| 32 // We depend on the valid targets (!= AUTH_NONE) being usable as indexes | 40 // We depend on the valid targets (!= AUTH_NONE) being usable as indexes |
| 33 // in an array, so start from 0. | 41 // in an array, so start from 0. |
| 34 AUTH_PROXY = 0, | 42 AUTH_PROXY = 0, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 HttpAuthHandler* handler, | 173 HttpAuthHandler* handler, |
| 166 const HttpResponseHeaders* headers, | 174 const HttpResponseHeaders* headers, |
| 167 Target target, | 175 Target target, |
| 168 const std::set<Scheme>& disabled_schemes, | 176 const std::set<Scheme>& disabled_schemes, |
| 169 std::string* challenge_used); | 177 std::string* challenge_used); |
| 170 }; | 178 }; |
| 171 | 179 |
| 172 } // namespace net | 180 } // namespace net |
| 173 | 181 |
| 174 #endif // NET_HTTP_HTTP_AUTH_H_ | 182 #endif // NET_HTTP_HTTP_AUTH_H_ |
| OLD | NEW |