Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Unified Diff: chrome/browser/chromeos/login/authenticator.h

Issue 12704002: Support for auth code based authentication flow for both app and web UI driven flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase4 Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/authenticator.h
diff --git a/chrome/browser/chromeos/login/authenticator.h b/chrome/browser/chromeos/login/authenticator.h
index e13e6d10a1e63df9ca3cf36345eb8285bc7c7ead..c2b260edd6d3655d001b2a6573852fb5ebe1b3c4 100644
--- a/chrome/browser/chromeos/login/authenticator.h
+++ b/chrome/browser/chromeos/login/authenticator.h
@@ -16,6 +16,8 @@ class Profile;
namespace chromeos {
+struct UserCredentials;
+
// An interface for objects that will authenticate a Chromium OS user.
// When authentication successfully completes, will call
// consumer_->OnLoginSuccess() on the UI thread.
@@ -29,28 +31,26 @@ class Authenticator : public base::RefCountedThreadSafe<Authenticator> {
// Given externally authenticated |username| and |password|, this method
// attempts to complete authentication process.
virtual void CompleteLogin(Profile* profile,
- const std::string& username,
- const std::string& password) = 0;
+ const UserCredentials& credentials) = 0;
// Given a |username| and |password|, this method attempts to authenticate
// to login.
// Optionally |login_token| and |login_captcha| could be provided.
// Must be called on the UI thread.
virtual void AuthenticateToLogin(Profile* profile,
- const std::string& username,
- const std::string& password,
+ const UserCredentials& credentials,
const std::string& login_token,
const std::string& login_captcha) = 0;
// Given a |username| and |password|, this method attempts to
// authenticate to unlock the computer.
// Must be called on the UI thread.
- virtual void AuthenticateToUnlock(const std::string& username,
- const std::string& password) = 0;
+ virtual void AuthenticateToUnlock(
+ const UserCredentials& credentials) = 0;
// Initiates locally managed user login.
- virtual void LoginAsLocallyManagedUser(const std::string& username,
- const std::string& password) = 0;
+ virtual void LoginAsLocallyManagedUser(
+ const UserCredentials& credentials) = 0;
// Initiates retail mode login.
virtual void LoginRetailMode() = 0;
@@ -88,8 +88,7 @@ class Authenticator : public base::RefCountedThreadSafe<Authenticator> {
// Attempt to authenticate online again.
virtual void RetryAuth(Profile* profile,
- const std::string& username,
- const std::string& password,
+ const UserCredentials& credentials,
const std::string& login_token,
const std::string& login_captcha) = 0;
« no previous file with comments | « chrome/browser/chromeos/login/auth_attempt_state.cc ('k') | chrome/browser/chromeos/login/existing_user_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698