Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: net/http/http_auth_handler_factory.h

Issue 1391053002: [net/http auth] Make HttpAuthHandler challenge handling asynchronous. Base URL: https://chromium.googlesource.com/chromium/src.git@auth-handler-init-split
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_auth_handler_digest_unittest.cc ('k') | net/http/http_auth_handler_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const std::string& scheme) = 0; 75 const std::string& scheme) = 0;
76 76
77 // Creates an HTTP authentication handler based on the authentication 77 // Creates an HTTP authentication handler based on the authentication
78 // challenge string |challenge|. 78 // challenge string |challenge|.
79 // This is a convenience function which creates a ChallengeTokenizer for 79 // This is a convenience function which creates a ChallengeTokenizer for
80 // |challenge| and calls |CreateAuthHandler|. See |CreateAuthHandler| for 80 // |challenge| and calls |CreateAuthHandler|. See |CreateAuthHandler| for
81 // more details on return values. 81 // more details on return values.
82 // TODO(asanka): UPdate comment 82 // TODO(asanka): UPdate comment
83 virtual scoped_ptr<HttpAuthHandler> CreateAndInitPreemptiveAuthHandler( 83 virtual scoped_ptr<HttpAuthHandler> CreateAndInitPreemptiveAuthHandler(
84 HttpAuthCache::Entry* cache_entry, 84 HttpAuthCache::Entry* cache_entry,
85 const HttpAuthChallengeTokenizer& tokenizer,
86 HttpAuth::Target target, 85 HttpAuth::Target target,
87 const BoundNetLog& net_log) = 0; 86 const BoundNetLog& net_log) = 0;
88 87
89 // Creates a standard HttpAuthHandlerRegistryFactory. The caller is 88 // Creates a standard HttpAuthHandlerRegistryFactory. The caller is
90 // responsible for deleting the factory. 89 // responsible for deleting the factory.
91 // The default factory supports Basic, Digest, NTLM, and Negotiate schemes. 90 // The default factory supports Basic, Digest, NTLM, and Negotiate schemes.
92 // 91 //
93 // |resolver| is used by the Negotiate authentication handler to perform 92 // |resolver| is used by the Negotiate authentication handler to perform
94 // CNAME lookups to generate a Kerberos SPN for the server. It must be 93 // CNAME lookups to generate a Kerberos SPN for the server. It must be
95 // non-NULL. |resolver| must remain valid for the lifetime of the 94 // non-NULL. |resolver| must remain valid for the lifetime of the
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 bool negotiate_enable_port); 169 bool negotiate_enable_port);
171 170
172 scoped_ptr<HttpAuthHandler> CreateAuthHandlerForScheme( 171 scoped_ptr<HttpAuthHandler> CreateAuthHandlerForScheme(
173 const std::string& scheme) override; 172 const std::string& scheme) override;
174 173
175 // Create an auth handler by dispatching the CreateAuthHandler() call to the 174 // Create an auth handler by dispatching the CreateAuthHandler() call to the
176 // factory registered to handle challenge->scheme(). TODO(asanka): Update 175 // factory registered to handle challenge->scheme(). TODO(asanka): Update
177 // comment 176 // comment
178 scoped_ptr<HttpAuthHandler> CreateAndInitPreemptiveAuthHandler( 177 scoped_ptr<HttpAuthHandler> CreateAndInitPreemptiveAuthHandler(
179 HttpAuthCache::Entry* cache_entry, 178 HttpAuthCache::Entry* cache_entry,
180 const HttpAuthChallengeTokenizer& tokenizer,
181 HttpAuth::Target target, 179 HttpAuth::Target target,
182 const BoundNetLog& net_log) override; 180 const BoundNetLog& net_log) override;
183 181
184 private: 182 private:
185 typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap; 183 typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap;
186 184
187 FactoryMap factory_map_; 185 FactoryMap factory_map_;
188 DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory); 186 DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory);
189 }; 187 };
190 188
191 } // namespace net 189 } // namespace net
192 190
193 #endif // NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ 191 #endif // NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_digest_unittest.cc ('k') | net/http/http_auth_handler_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698