| 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 #include "url/origin.h" |
| 15 | 16 |
| 16 template <class T> class scoped_refptr; | 17 template <class T> class scoped_refptr; |
| 17 | 18 |
| 18 namespace net { | 19 namespace net { |
| 19 | 20 |
| 20 class BoundNetLog; | 21 class BoundNetLog; |
| 21 class HttpAuthHandler; | 22 class HttpAuthHandler; |
| 22 class HttpAuthHandlerFactory; | 23 class HttpAuthHandlerFactory; |
| 23 class HttpResponseHeaders; | 24 class HttpResponseHeaders; |
| 24 | 25 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // |*handler| is set to NULL. | 129 // |*handler| is set to NULL. |
| 129 // | 130 // |
| 130 // |disabled_schemes| is the set of schemes that we should not use. | 131 // |disabled_schemes| is the set of schemes that we should not use. |
| 131 // | 132 // |
| 132 // |origin| is used by the NTLM and Negotiation authentication scheme to | 133 // |origin| is used by the NTLM and Negotiation authentication scheme to |
| 133 // construct the service principal name. It is ignored by other schemes. | 134 // construct the service principal name. It is ignored by other schemes. |
| 134 static void ChooseBestChallenge( | 135 static void ChooseBestChallenge( |
| 135 HttpAuthHandlerFactory* http_auth_handler_factory, | 136 HttpAuthHandlerFactory* http_auth_handler_factory, |
| 136 const HttpResponseHeaders* headers, | 137 const HttpResponseHeaders* headers, |
| 137 Target target, | 138 Target target, |
| 138 const GURL& origin, | 139 const url::Origin& origin, |
| 139 const std::set<Scheme>& disabled_schemes, | 140 const std::set<Scheme>& disabled_schemes, |
| 140 const BoundNetLog& net_log, | 141 const BoundNetLog& net_log, |
| 141 scoped_ptr<HttpAuthHandler>* handler); | 142 scoped_ptr<HttpAuthHandler>* handler); |
| 142 | 143 |
| 143 // Handle a 401/407 response from a server/proxy after a previous | 144 // Handle a 401/407 response from a server/proxy after a previous |
| 144 // authentication attempt. For connection-based authentication schemes, the | 145 // authentication attempt. For connection-based authentication schemes, the |
| 145 // new response may be another round in a multi-round authentication sequence. | 146 // new response may be another round in a multi-round authentication sequence. |
| 146 // For request-based schemes, a 401/407 response is typically treated like a | 147 // For request-based schemes, a 401/407 response is typically treated like a |
| 147 // rejection of the previous challenge, except in the Digest case when a | 148 // rejection of the previous challenge, except in the Digest case when a |
| 148 // "stale" attribute is present. | 149 // "stale" attribute is present. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 165 HttpAuthHandler* handler, | 166 HttpAuthHandler* handler, |
| 166 const HttpResponseHeaders* headers, | 167 const HttpResponseHeaders* headers, |
| 167 Target target, | 168 Target target, |
| 168 const std::set<Scheme>& disabled_schemes, | 169 const std::set<Scheme>& disabled_schemes, |
| 169 std::string* challenge_used); | 170 std::string* challenge_used); |
| 170 }; | 171 }; |
| 171 | 172 |
| 172 } // namespace net | 173 } // namespace net |
| 173 | 174 |
| 174 #endif // NET_HTTP_HTTP_AUTH_H_ | 175 #endif // NET_HTTP_HTTP_AUTH_H_ |
| OLD | NEW |