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

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

Issue 1414313002: Allow dynamic updating of authentication policies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to cbentzel@'s comments. Created 5 years 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_negotiate_unittest.cc ('k') | net/http/http_auth_handler_ntlm.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_NTLM_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_
6 #define NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_ 6 #define NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 // This contains the portable and the SSPI implementations for NTLM. 10 // This contains the portable and the SSPI implementations for NTLM.
(...skipping 13 matching lines...) Expand all
24 24
25 #include <string> 25 #include <string>
26 26
27 #include "base/basictypes.h" 27 #include "base/basictypes.h"
28 #include "base/strings/string16.h" 28 #include "base/strings/string16.h"
29 #include "net/http/http_auth_handler.h" 29 #include "net/http/http_auth_handler.h"
30 #include "net/http/http_auth_handler_factory.h" 30 #include "net/http/http_auth_handler_factory.h"
31 31
32 namespace net { 32 namespace net {
33 33
34 class URLSecurityManager; 34 class HttpAuthPreferences;
35 35
36 // Code for handling HTTP NTLM authentication. 36 // Code for handling HTTP NTLM authentication.
37 class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler { 37 class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler {
38 public: 38 public:
39 class Factory : public HttpAuthHandlerFactory { 39 class Factory : public HttpAuthHandlerFactory {
40 public: 40 public:
41 Factory(); 41 Factory();
42 ~Factory() override; 42 ~Factory() override;
43 43
44 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, 44 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 private: 91 private:
92 GenerateRandomProc old_random_proc_; 92 GenerateRandomProc old_random_proc_;
93 HostNameProc old_host_name_proc_; 93 HostNameProc old_host_name_proc_;
94 }; 94 };
95 #endif 95 #endif
96 96
97 #if defined(NTLM_PORTABLE) 97 #if defined(NTLM_PORTABLE)
98 HttpAuthHandlerNTLM(); 98 HttpAuthHandlerNTLM();
99 #endif 99 #endif
100 #if defined(NTLM_SSPI) 100 #if defined(NTLM_SSPI)
101 HttpAuthHandlerNTLM(SSPILibrary* sspi_library, ULONG max_token_length, 101 HttpAuthHandlerNTLM(SSPILibrary* sspi_library,
102 URLSecurityManager* url_security_manager); 102 ULONG max_token_length,
103 const HttpAuthPreferences* http_auth_preferences);
103 #endif 104 #endif
104 105
105 bool NeedsIdentity() override; 106 bool NeedsIdentity() override;
106 107
107 bool AllowsDefaultCredentials() override; 108 bool AllowsDefaultCredentials() override;
108 109
109 HttpAuth::AuthorizationResult HandleAnotherChallenge( 110 HttpAuth::AuthorizationResult HandleAnotherChallenge(
110 HttpAuthChallengeTokenizer* challenge) override; 111 HttpAuthChallengeTokenizer* challenge) override;
111 112
112 protected: 113 protected:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 #endif 156 #endif
156 157
157 base::string16 domain_; 158 base::string16 domain_;
158 AuthCredentials credentials_; 159 AuthCredentials credentials_;
159 160
160 // The base64-encoded string following "NTLM" in the "WWW-Authenticate" or 161 // The base64-encoded string following "NTLM" in the "WWW-Authenticate" or
161 // "Proxy-Authenticate" response header. 162 // "Proxy-Authenticate" response header.
162 std::string auth_data_; 163 std::string auth_data_;
163 164
164 #if defined(NTLM_SSPI) 165 #if defined(NTLM_SSPI)
165 URLSecurityManager* url_security_manager_; 166 const HttpAuthPreferences* http_auth_preferences_;
166 #endif 167 #endif
167 }; 168 };
168 169
169 } // namespace net 170 } // namespace net
170 171
171 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_ 172 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_negotiate_unittest.cc ('k') | net/http/http_auth_handler_ntlm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698