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

Unified Diff: chromeos/dbus/fake_auth_policy_client.cc

Issue 2835473002: Chromad: Allow offline login. (Closed)
Patch Set: Add TryAuthenticateUser call Created 3 years, 8 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
« no previous file with comments | « chromeos/dbus/fake_auth_policy_client.h ('k') | chromeos/dbus/fake_auth_policy_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_auth_policy_client.cc
diff --git a/chromeos/dbus/fake_auth_policy_client.cc b/chromeos/dbus/fake_auth_policy_client.cc
index a7c0fe053a454ff8320dd1eff112a4b3700e41be..bad9a11c011fcf3d11e26c145e378bcbd27a601e 100644
--- a/chromeos/dbus/fake_auth_policy_client.cc
+++ b/chromeos/dbus/fake_auth_policy_client.cc
@@ -105,6 +105,7 @@ void FakeAuthPolicyClient::JoinAdDomain(const std::string& machine_name,
void FakeAuthPolicyClient::AuthenticateUser(
const std::string& user_principal_name,
+ const std::string& object_guid,
int password_fd,
AuthCallback callback) {
authpolicy::ErrorType error = authpolicy::ERROR_NONE;
@@ -113,8 +114,12 @@ void FakeAuthPolicyClient::AuthenticateUser(
LOG(ERROR) << "authpolicyd not started";
error = authpolicy::ERROR_DBUS_FAILURE;
} else {
- if (auth_error_ == authpolicy::ERROR_NONE)
- account_data.set_account_id(base::MD5String(user_principal_name));
+ if (auth_error_ == authpolicy::ERROR_NONE) {
+ if (object_guid.empty())
+ account_data.set_account_id(base::MD5String(user_principal_name));
+ else
+ account_data.set_account_id(object_guid);
+ }
error = auth_error_;
}
PostDelayedClosure(base::BindOnce(std::move(callback), error, account_data));
« no previous file with comments | « chromeos/dbus/fake_auth_policy_client.h ('k') | chromeos/dbus/fake_auth_policy_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698