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 // Use this class to authenticate users with Gaia and access cookies sent | 5 // Use this class to authenticate users with Gaia and access cookies sent |
6 // by the Gaia servers. This class cannot be used on its own becaue it relies | 6 // by the Gaia servers. This class cannot be used on its own becaue it relies |
7 // on a subclass to provide the virtual Post and GetBackoffDelaySeconds methods. | 7 // on a subclass to provide the virtual Post and GetBackoffDelaySeconds methods. |
8 // | 8 // |
9 // Sample usage: | 9 // Sample usage: |
10 // class ActualGaiaAuthenticator : public gaia::GaiaAuthenticator { | 10 // class ActualGaiaAuthenticator : public gaia::GaiaAuthenticator { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 const std::string& password); | 103 const std::string& password); |
104 | 104 |
105 void SetUsername(const std::string& username); | 105 void SetUsername(const std::string& username); |
106 | 106 |
107 // Virtual for testing | 107 // Virtual for testing |
108 virtual void RenewAuthToken(const std::string& auth_token); | 108 virtual void RenewAuthToken(const std::string& auth_token); |
109 void SetAuthToken(const std::string& auth_token); | 109 void SetAuthToken(const std::string& auth_token); |
110 | 110 |
111 struct AuthResults { | 111 struct AuthResults { |
112 AuthResults(); | 112 AuthResults(); |
| 113 AuthResults(const AuthResults& other); |
113 ~AuthResults(); | 114 ~AuthResults(); |
114 | 115 |
115 std::string email; | 116 std::string email; |
116 std::string password; | 117 std::string password; |
117 | 118 |
118 // Fields that store various cookies. | 119 // Fields that store various cookies. |
119 std::string sid; | 120 std::string sid; |
120 std::string lsid; | 121 std::string lsid; |
121 std::string auth_token; | 122 std::string auth_token; |
122 | 123 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 time_t next_allowed_auth_attempt_time_; | 264 time_t next_allowed_auth_attempt_time_; |
264 #endif // defined(OS_WIN) | 265 #endif // defined(OS_WIN) |
265 int early_auth_attempt_count_; | 266 int early_auth_attempt_count_; |
266 | 267 |
267 // The message loop all our methods are invoked on. | 268 // The message loop all our methods are invoked on. |
268 const MessageLoop* message_loop_; | 269 const MessageLoop* message_loop_; |
269 }; | 270 }; |
270 | 271 |
271 } // namespace gaia | 272 } // namespace gaia |
272 #endif // CHROME_COMMON_NET_GAIA_GAIA_AUTHENTICATOR_H_ | 273 #endif // CHROME_COMMON_NET_GAIA_GAIA_AUTHENTICATOR_H_ |
OLD | NEW |