| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GSSAPI_POSIX_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ |
| 6 #define NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ | 6 #define NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 class HttpAuthGSSAPI { | 216 class HttpAuthGSSAPI { |
| 217 public: | 217 public: |
| 218 HttpAuthGSSAPI(GSSAPILibrary* library, | 218 HttpAuthGSSAPI(GSSAPILibrary* library, |
| 219 const std::string& scheme, | 219 const std::string& scheme, |
| 220 const gss_OID gss_oid); | 220 const gss_OID gss_oid); |
| 221 ~HttpAuthGSSAPI(); | 221 ~HttpAuthGSSAPI(); |
| 222 | 222 |
| 223 bool Init(); | 223 bool Init(); |
| 224 | 224 |
| 225 bool NeedsIdentity() const; | 225 bool NeedsIdentity() const; |
| 226 bool IsFinalRound() const; | |
| 227 | 226 |
| 228 bool ParseChallenge(HttpAuth::ChallengeTokenizer* tok); | 227 HttpAuth::AuthorizationResult ParseChallenge( |
| 228 HttpAuth::ChallengeTokenizer* tok); |
| 229 | 229 |
| 230 // Generates an authentication token. | 230 // Generates an authentication token. |
| 231 // The return value is an error code. If it's not |OK|, the value of | 231 // The return value is an error code. If it's not |OK|, the value of |
| 232 // |*auth_token| is unspecified. | 232 // |*auth_token| is unspecified. |
| 233 // |spn| is the Service Principal Name of the server that the token is | 233 // |spn| is the Service Principal Name of the server that the token is |
| 234 // being generated for. | 234 // being generated for. |
| 235 // If this is the first round of a multiple round scheme, credentials are | 235 // If this is the first round of a multiple round scheme, credentials are |
| 236 // obtained using |*username| and |*password|. If |username| and |password| | 236 // obtained using |*username| and |*password|. If |username| and |password| |
| 237 // are NULL, the default credentials are used instead. | 237 // are NULL, the default credentials are used instead. |
| 238 int GenerateAuthToken(const string16* username, | 238 int GenerateAuthToken(const string16* username, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 254 gss_OID gss_oid_; | 254 gss_OID gss_oid_; |
| 255 GSSAPILibrary* library_; | 255 GSSAPILibrary* library_; |
| 256 std::string decoded_server_auth_token_; | 256 std::string decoded_server_auth_token_; |
| 257 ScopedSecurityContext scoped_sec_context_; | 257 ScopedSecurityContext scoped_sec_context_; |
| 258 bool can_delegate_; | 258 bool can_delegate_; |
| 259 }; | 259 }; |
| 260 | 260 |
| 261 } // namespace net | 261 } // namespace net |
| 262 | 262 |
| 263 #endif // NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ | 263 #endif // NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ |
| OLD | NEW |