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 // 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 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 const std::string& scheme, | 112 const std::string& scheme, |
113 const SEC_WCHAR* security_package, | 113 const SEC_WCHAR* security_package, |
114 ULONG max_token_length); | 114 ULONG max_token_length); |
115 ~HttpAuthSSPI(); | 115 ~HttpAuthSSPI(); |
116 | 116 |
117 bool NeedsIdentity() const; | 117 bool NeedsIdentity() const; |
118 | 118 |
119 bool AllowsExplicitCredentials() const; | 119 bool AllowsExplicitCredentials() const; |
120 | 120 |
121 HttpAuth::AuthorizationResult ParseChallenge( | 121 HttpAuth::AuthorizationResult ParseChallenge( |
122 HttpAuthChallengeTokenizer* tok); | 122 const HttpAuthChallengeTokenizer& tok); |
123 | 123 |
124 // Generates an authentication token. | 124 // Generates an authentication token. |
125 // | 125 // |
126 // The return value is an error code. The authentication token will be | 126 // The return value is an error code. The authentication token will be |
127 // returned in |*auth_token|. If the result code is not |OK|, the value of | 127 // returned in |*auth_token|. If the result code is not |OK|, the value of |
128 // |*auth_token| is unspecified. | 128 // |*auth_token| is unspecified. |
129 // | 129 // |
130 // If the operation cannot be completed synchronously, |ERR_IO_PENDING| will | 130 // If the operation cannot be completed synchronously, |ERR_IO_PENDING| will |
131 // be returned and the real result code will be passed to the completion | 131 // be returned and the real result code will be passed to the completion |
132 // callback. Otherwise the result code is returned immediately from this | 132 // callback. Otherwise the result code is returned immediately from this |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // If the return value is ERR_UNEXPECTED, there was an unanticipated problem | 200 // If the return value is ERR_UNEXPECTED, there was an unanticipated problem |
201 // in the underlying SSPI call. The details are logged, and |*max_token_length| | 201 // in the underlying SSPI call. The details are logged, and |*max_token_length| |
202 // is not changed. | 202 // is not changed. |
203 NET_EXPORT_PRIVATE int DetermineMaxTokenLength(SSPILibrary* library, | 203 NET_EXPORT_PRIVATE int DetermineMaxTokenLength(SSPILibrary* library, |
204 const std::wstring& package, | 204 const std::wstring& package, |
205 ULONG* max_token_length); | 205 ULONG* max_token_length); |
206 | 206 |
207 } // namespace net | 207 } // namespace net |
208 | 208 |
209 #endif // NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ | 209 #endif // NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ |
OLD | NEW |