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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE; | 111 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE; |
112 virtual void ResyncEncryptedData( | 112 virtual void ResyncEncryptedData( |
113 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE; | 113 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE; |
114 virtual void RetryAuth(Profile* profile, | 114 virtual void RetryAuth(Profile* profile, |
115 const std::string& username, | 115 const std::string& username, |
116 const std::string& password, | 116 const std::string& password, |
117 const std::string& login_token, | 117 const std::string& login_token, |
118 const std::string& login_captcha) OVERRIDE; | 118 const std::string& login_captcha) OVERRIDE; |
119 virtual void VerifyOAuth1AccessToken(const std::string& auth1_token, | 119 virtual void VerifyOAuth1AccessToken(const std::string& auth1_token, |
120 const std::string& oauth1_secret) OVERRIDE; | 120 const std::string& oauth1_secret) OVERRIDE; |
| 121 virtual std::string EncryptToken(const std::string& token) OVERRIDE; |
| 122 virtual std::string DecryptToken(const std::string& encrypted_token) OVERRIDE; |
121 | 123 |
122 // Callbacks from GaiaAuthFetcher | 124 // Callbacks from GaiaAuthFetcher |
123 virtual void OnClientLoginFailure( | 125 virtual void OnClientLoginFailure( |
124 const GoogleServiceAuthError& error) OVERRIDE; | 126 const GoogleServiceAuthError& error) OVERRIDE; |
125 virtual void OnClientLoginSuccess( | 127 virtual void OnClientLoginSuccess( |
126 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE; | 128 const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE; |
127 | 129 |
128 private: | 130 private: |
129 | 131 |
130 // If we don't have the system salt yet, loads it from the CryptohomeLibrary. | 132 // If we don't have the system salt yet, loads it from the CryptohomeLibrary. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginNetFailure); | 246 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginNetFailure); |
245 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginDenied); | 247 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginDenied); |
246 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, TwoFactorLogin); | 248 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, TwoFactorLogin); |
247 | 249 |
248 DISALLOW_COPY_AND_ASSIGN(GoogleAuthenticator); | 250 DISALLOW_COPY_AND_ASSIGN(GoogleAuthenticator); |
249 }; | 251 }; |
250 | 252 |
251 } // namespace chromeos | 253 } // namespace chromeos |
252 | 254 |
253 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ | 255 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ |
OLD | NEW |