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_FACTORY_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ |
6 #define NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ | 6 #define NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // |security_manager| is used by the NTLM and Negotiate authenticators | 162 // |security_manager| is used by the NTLM and Negotiate authenticators |
163 // to determine which servers Integrated Authentication can be used with. If | 163 // to determine which servers Integrated Authentication can be used with. If |
164 // NULL, Integrated Authentication will not be used with any server. | 164 // NULL, Integrated Authentication will not be used with any server. |
165 // | 165 // |
166 // |host_resolver| is used by the Negotiate authentication handler to perform | 166 // |host_resolver| is used by the Negotiate authentication handler to perform |
167 // CNAME lookups to generate a Kerberos SPN for the server. If the "negotiate" | 167 // CNAME lookups to generate a Kerberos SPN for the server. If the "negotiate" |
168 // scheme is used and |negotiate_disable_cname_lookup| is false, | 168 // scheme is used and |negotiate_disable_cname_lookup| is false, |
169 // |host_resolver| must not be NULL. | 169 // |host_resolver| must not be NULL. |
170 // | 170 // |
171 // |gssapi_library_name| specifies the name of the GSSAPI library that will | 171 // |gssapi_library_name| specifies the name of the GSSAPI library that will |
172 // be loaded on all platforms except Windows. | 172 // be loaded on Posix platforms other than Android. |gssapi_library_name| is |
| 173 // ignored on Android and Windows. |
| 174 // |
| 175 // |auth_android_negotiate_account_type| is an Android account type, used to |
| 176 // find the appropriate authenticator service on Android. It is ignored on |
| 177 // non-Android platforms. |
173 // | 178 // |
174 // |negotiate_disable_cname_lookup| and |negotiate_enable_port| both control | 179 // |negotiate_disable_cname_lookup| and |negotiate_enable_port| both control |
175 // how Negotiate does SPN generation, by default these should be false. | 180 // how Negotiate does SPN generation, by default these should be false. |
176 static HttpAuthHandlerRegistryFactory* Create( | 181 static HttpAuthHandlerRegistryFactory* Create( |
177 const std::vector<std::string>& supported_schemes, | 182 const std::vector<std::string>& supported_schemes, |
178 URLSecurityManager* security_manager, | 183 URLSecurityManager* security_manager, |
179 HostResolver* host_resolver, | 184 HostResolver* host_resolver, |
180 const std::string& gssapi_library_name, | 185 const std::string& gssapi_library_name, |
| 186 const std::string& auth_android_negotiate_account_type, |
181 bool negotiate_disable_cname_lookup, | 187 bool negotiate_disable_cname_lookup, |
182 bool negotiate_enable_port); | 188 bool negotiate_enable_port); |
183 | 189 |
184 // Creates an auth handler by dispatching out to the registered factories | 190 // Creates an auth handler by dispatching out to the registered factories |
185 // based on the first token in |challenge|. | 191 // based on the first token in |challenge|. |
186 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, | 192 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, |
187 HttpAuth::Target target, | 193 HttpAuth::Target target, |
188 const GURL& origin, | 194 const GURL& origin, |
189 CreateReason reason, | 195 CreateReason reason, |
190 int digest_nonce_count, | 196 int digest_nonce_count, |
191 const BoundNetLog& net_log, | 197 const BoundNetLog& net_log, |
192 scoped_ptr<HttpAuthHandler>* handler) override; | 198 scoped_ptr<HttpAuthHandler>* handler) override; |
193 | 199 |
194 private: | 200 private: |
195 typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap; | 201 typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap; |
196 | 202 |
197 FactoryMap factory_map_; | 203 FactoryMap factory_map_; |
198 DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory); | 204 DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory); |
199 }; | 205 }; |
200 | 206 |
201 } // namespace net | 207 } // namespace net |
202 | 208 |
203 #endif // NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ | 209 #endif // NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ |
OLD | NEW |