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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/string16.h" | 13 #include "net/base/auth.h" |
14 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
15 #include "net/http/http_util.h" | 15 #include "net/http/http_util.h" |
16 | 16 |
17 template <class T> class scoped_refptr; | 17 template <class T> class scoped_refptr; |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 | 20 |
21 class BoundNetLog; | 21 class BoundNetLog; |
22 class HttpAuthHandler; | 22 class HttpAuthHandler; |
23 class HttpAuthHandlerFactory; | 23 class HttpAuthHandlerFactory; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 AUTH_SCHEME_MAX, | 97 AUTH_SCHEME_MAX, |
98 }; | 98 }; |
99 | 99 |
100 // Helper structure used by HttpNetworkTransaction to track | 100 // Helper structure used by HttpNetworkTransaction to track |
101 // the current identity being used for authorization. | 101 // the current identity being used for authorization. |
102 struct Identity { | 102 struct Identity { |
103 Identity(); | 103 Identity(); |
104 | 104 |
105 IdentitySource source; | 105 IdentitySource source; |
106 bool invalid; | 106 bool invalid; |
107 string16 username; | 107 AuthCredentials credentials; |
108 string16 password; | |
109 }; | 108 }; |
110 | 109 |
111 // Get the name of the header containing the auth challenge | 110 // Get the name of the header containing the auth challenge |
112 // (either WWW-Authenticate or Proxy-Authenticate). | 111 // (either WWW-Authenticate or Proxy-Authenticate). |
113 static std::string GetChallengeHeaderName(Target target); | 112 static std::string GetChallengeHeaderName(Target target); |
114 | 113 |
115 // Get the name of the header where the credentials go | 114 // Get the name of the header where the credentials go |
116 // (either Authorization or Proxy-Authorization). | 115 // (either Authorization or Proxy-Authorization). |
117 static std::string GetAuthorizationHeaderName(Target target); | 116 static std::string GetAuthorizationHeaderName(Target target); |
118 | 117 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 std::string::const_iterator scheme_end_; | 215 std::string::const_iterator scheme_end_; |
217 | 216 |
218 std::string::const_iterator params_begin_; | 217 std::string::const_iterator params_begin_; |
219 std::string::const_iterator params_end_; | 218 std::string::const_iterator params_end_; |
220 }; | 219 }; |
221 }; | 220 }; |
222 | 221 |
223 } // namespace net | 222 } // namespace net |
224 | 223 |
225 #endif // NET_HTTP_HTTP_AUTH_H_ | 224 #endif // NET_HTTP_HTTP_AUTH_H_ |
OLD | NEW |