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

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

Issue 7748033: Don't try to use explicit credentials with schemes that don't support it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit test Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_auth_handler_negotiate.cc ('k') | net/http/http_auth_sspi_win.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 // This file contains common routines used by NTLM and Negotiate authentication 5 // This file contains common routines used by NTLM and Negotiate authentication
6 // using the SSPI API on Windows. 6 // using the SSPI API on Windows.
7 7
8 #ifndef NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ 8 #ifndef NET_HTTP_HTTP_AUTH_SSPI_WIN_H_
9 #define NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ 9 #define NET_HTTP_HTTP_AUTH_SSPI_WIN_H_
10 #pragma once 10 #pragma once
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 class NET_EXPORT_PRIVATE HttpAuthSSPI { 125 class NET_EXPORT_PRIVATE HttpAuthSSPI {
126 public: 126 public:
127 HttpAuthSSPI(SSPILibrary* sspi_library, 127 HttpAuthSSPI(SSPILibrary* sspi_library,
128 const std::string& scheme, 128 const std::string& scheme,
129 SEC_WCHAR* security_package, 129 SEC_WCHAR* security_package,
130 ULONG max_token_length); 130 ULONG max_token_length);
131 ~HttpAuthSSPI(); 131 ~HttpAuthSSPI();
132 132
133 bool NeedsIdentity() const; 133 bool NeedsIdentity() const;
134 134
135 bool AllowsExplicitCredentials() const;
136
135 HttpAuth::AuthorizationResult ParseChallenge( 137 HttpAuth::AuthorizationResult ParseChallenge(
136 HttpAuth::ChallengeTokenizer* tok); 138 HttpAuth::ChallengeTokenizer* tok);
137 139
138 // Generates an authentication token for the service specified by the 140 // Generates an authentication token for the service specified by the
139 // Service Principal Name |spn| and stores the value in |*auth_token|. 141 // Service Principal Name |spn| and stores the value in |*auth_token|.
140 // If the return value is not |OK|, then the value of |*auth_token| is 142 // If the return value is not |OK|, then the value of |*auth_token| is
141 // unspecified. ERR_IO_PENDING is not a valid return code. 143 // unspecified. ERR_IO_PENDING is not a valid return code.
142 // If this is the first round of a multiple round scheme, credentials are 144 // If this is the first round of a multiple round scheme, credentials are
143 // obtained using |*username| and |*password|. If |username| and |password| 145 // obtained using |*username| and |*password|. If |username| and |password|
144 // are both NULL, the credentials for the currently logged in user are used 146 // are both NULL, the credentials for the currently logged in user are used
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // If the return value is ERR_UNEXPECTED, there was an unanticipated problem 201 // If the return value is ERR_UNEXPECTED, there was an unanticipated problem
200 // in the underlying SSPI call. The details are logged, and |*max_token_length| 202 // in the underlying SSPI call. The details are logged, and |*max_token_length|
201 // is not changed. 203 // is not changed.
202 NET_EXPORT_PRIVATE int DetermineMaxTokenLength(SSPILibrary* library, 204 NET_EXPORT_PRIVATE int DetermineMaxTokenLength(SSPILibrary* library,
203 const std::wstring& package, 205 const std::wstring& package,
204 ULONG* max_token_length); 206 ULONG* max_token_length);
205 207
206 } // namespace net 208 } // namespace net
207 209
208 #endif // NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ 210 #endif // NET_HTTP_HTTP_AUTH_SSPI_WIN_H_
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_negotiate.cc ('k') | net/http/http_auth_sspi_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698