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

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

Issue 1408433006: Support tls-server-end-point channel bindings for HTTP authentication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 27 matching lines...) Expand all
38 // Code for handling HTTP NTLM authentication. 38 // Code for handling HTTP NTLM authentication.
39 class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler { 39 class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler {
40 public: 40 public:
41 class Factory : public HttpAuthHandlerFactory { 41 class Factory : public HttpAuthHandlerFactory {
42 public: 42 public:
43 Factory(); 43 Factory();
44 ~Factory() override; 44 ~Factory() override;
45 45
46 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, 46 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
47 HttpAuth::Target target, 47 HttpAuth::Target target,
48 const HttpResponseInfo& response_info,
48 const GURL& origin, 49 const GURL& origin,
49 CreateReason reason, 50 CreateReason reason,
50 int digest_nonce_count, 51 int digest_nonce_count,
51 const BoundNetLog& net_log, 52 const BoundNetLog& net_log,
52 scoped_ptr<HttpAuthHandler>* handler) override; 53 scoped_ptr<HttpAuthHandler>* handler) override;
53 #if defined(NTLM_SSPI) 54 #if defined(NTLM_SSPI)
54 // Set the SSPILibrary to use. Typically the only callers which need to use 55 // Set the SSPILibrary to use. Typically the only callers which need to use
55 // this are unit tests which pass in a mocked-out version of the SSPI 56 // this are unit tests which pass in a mocked-out version of the SSPI
56 // library. After the call |sspi_library| will be owned by this Factory and 57 // library. After the call |sspi_library| will be owned by this Factory and
57 // will be destroyed when the Factory is destroyed. 58 // will be destroyed when the Factory is destroyed.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool AllowsDefaultCredentials() override; 111 bool AllowsDefaultCredentials() override;
111 112
112 HttpAuth::AuthorizationResult HandleAnotherChallenge( 113 HttpAuth::AuthorizationResult HandleAnotherChallenge(
113 HttpAuthChallengeTokenizer* challenge) override; 114 HttpAuthChallengeTokenizer* challenge) override;
114 115
115 protected: 116 protected:
116 // This function acquires a credentials handle in the SSPI implementation. 117 // This function acquires a credentials handle in the SSPI implementation.
117 // It does nothing in the portable implementation. 118 // It does nothing in the portable implementation.
118 int InitializeBeforeFirstChallenge(); 119 int InitializeBeforeFirstChallenge();
119 120
120 bool Init(HttpAuthChallengeTokenizer* tok) override; 121 bool Init(HttpAuthChallengeTokenizer* tok,
122 const HttpResponseInfo& response_info) override;
121 123
122 int GenerateAuthTokenImpl(const AuthCredentials* credentials, 124 int GenerateAuthTokenImpl(const AuthCredentials* credentials,
123 const HttpRequestInfo* request, 125 const HttpRequestInfo* request,
124 const CompletionCallback& callback, 126 const CompletionCallback& callback,
125 std::string* auth_token) override; 127 std::string* auth_token) override;
126 128
127 private: 129 private:
128 ~HttpAuthHandlerNTLM() override; 130 ~HttpAuthHandlerNTLM() override;
129 131
130 #if defined(NTLM_PORTABLE) 132 #if defined(NTLM_PORTABLE)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 std::string auth_data_; 167 std::string auth_data_;
166 168
167 #if defined(NTLM_SSPI) 169 #if defined(NTLM_SSPI)
168 const HttpAuthPreferences* http_auth_preferences_; 170 const HttpAuthPreferences* http_auth_preferences_;
169 #endif 171 #endif
170 }; 172 };
171 173
172 } // namespace net 174 } // namespace net
173 175
174 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_ 176 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698