| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ | 5 #ifndef CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ |
| 6 #define CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ | 6 #define CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 const UserContext& user_context) = 0; | 43 const UserContext& user_context) = 0; |
| 44 | 44 |
| 45 // Given a user credentials in |user_context|, this method attempts to | 45 // Given a user credentials in |user_context|, this method attempts to |
| 46 // authenticate to unlock the computer. | 46 // authenticate to unlock the computer. |
| 47 // Must be called on the UI thread. | 47 // Must be called on the UI thread. |
| 48 virtual void AuthenticateToUnlock(const UserContext& user_context) = 0; | 48 virtual void AuthenticateToUnlock(const UserContext& user_context) = 0; |
| 49 | 49 |
| 50 // Initiates supervised user login. | 50 // Initiates supervised user login. |
| 51 virtual void LoginAsSupervisedUser(const UserContext& user_context) = 0; | 51 virtual void LoginAsSupervisedUser(const UserContext& user_context) = 0; |
| 52 | 52 |
| 53 // Initiates retail mode login. | |
| 54 virtual void LoginRetailMode() = 0; | |
| 55 | |
| 56 // Initiates incognito ("browse without signing in") login. | 53 // Initiates incognito ("browse without signing in") login. |
| 57 virtual void LoginOffTheRecord() = 0; | 54 virtual void LoginOffTheRecord() = 0; |
| 58 | 55 |
| 59 // Initiates login into the public account identified by |user_context|. | 56 // Initiates login into the public account identified by |user_context|. |
| 60 virtual void LoginAsPublicSession(const UserContext& user_context) = 0; | 57 virtual void LoginAsPublicSession(const UserContext& user_context) = 0; |
| 61 | 58 |
| 62 // Initiates login into kiosk mode account identified by |app_user_id|. | 59 // Initiates login into kiosk mode account identified by |app_user_id|. |
| 63 // The |app_user_id| is a generated username for the account. | 60 // The |app_user_id| is a generated username for the account. |
| 64 // |use_guest_mount| specifies whether to force the session to use a | 61 // |use_guest_mount| specifies whether to force the session to use a |
| 65 // guest mount. If this is false, we use mount a public cryptohome. | 62 // guest mount. If this is false, we use mount a public cryptohome. |
| 66 virtual void LoginAsKioskAccount(const std::string& app_user_id, | 63 virtual void LoginAsKioskAccount(const std::string& app_user_id, |
| 67 bool use_guest_mount) = 0; | 64 bool use_guest_mount) = 0; |
| 68 | 65 |
| 69 // Completes retail mode login. | |
| 70 virtual void OnRetailModeAuthSuccess() = 0; | |
| 71 | |
| 72 // Notifies caller that login was successful. Must be called on the UI thread. | 66 // Notifies caller that login was successful. Must be called on the UI thread. |
| 73 virtual void OnAuthSuccess() = 0; | 67 virtual void OnAuthSuccess() = 0; |
| 74 | 68 |
| 75 // Must be called on the UI thread. | 69 // Must be called on the UI thread. |
| 76 virtual void OnAuthFailure(const AuthFailure& error) = 0; | 70 virtual void OnAuthFailure(const AuthFailure& error) = 0; |
| 77 | 71 |
| 78 // Call these methods on the UI thread. | 72 // Call these methods on the UI thread. |
| 79 // If a password logs the user in online, but cannot be used to | 73 // If a password logs the user in online, but cannot be used to |
| 80 // mount his cryptohome, we expect that a password change has | 74 // mount his cryptohome, we expect that a password change has |
| 81 // occurred. | 75 // occurred. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 105 | 99 |
| 106 private: | 100 private: |
| 107 friend class base::RefCountedThreadSafe<Authenticator>; | 101 friend class base::RefCountedThreadSafe<Authenticator>; |
| 108 | 102 |
| 109 DISALLOW_COPY_AND_ASSIGN(Authenticator); | 103 DISALLOW_COPY_AND_ASSIGN(Authenticator); |
| 110 }; | 104 }; |
| 111 | 105 |
| 112 } // namespace chromeos | 106 } // namespace chromeos |
| 113 | 107 |
| 114 #endif // CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ | 108 #endif // CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ |
| OLD | NEW |