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

Unified Diff: chromeos/dbus/fake_auth_policy_client.cc

Issue 2519823006: Chromad: Add authentication flow (Closed)
Patch Set: Rename HandleAdAuth. Use system_api enums Created 4 years 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/login/auth/cryptohome_authenticator.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 aaaa9b72d7ef785908f9e5c9e60bb328f9db10ae..02a9b5bea6e7a75c0810cf9f73d8544e487fa73f 100644
--- a/chromeos/dbus/fake_auth_policy_client.cc
+++ b/chromeos/dbus/fake_auth_policy_client.cc
@@ -8,6 +8,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/location.h"
+#include "base/md5.h"
#include "base/path_service.h"
#include "base/task_runner_util.h"
#include "base/threading/worker_pool.h"
@@ -61,12 +62,20 @@ FakeAuthPolicyClient::~FakeAuthPolicyClient() {}
void FakeAuthPolicyClient::Init(dbus::Bus* bus) {}
void FakeAuthPolicyClient::JoinAdDomain(const std::string& machine_name,
- const std::string& user,
+ const std::string& user_principal_name,
int password_fd,
const JoinCallback& callback) {
callback.Run(authpolicy::types::AD_JOIN_ERROR_NONE);
}
+void FakeAuthPolicyClient::AuthenticateUser(
+ const std::string& user_principal_name,
+ int password_fd,
+ const AuthCallback& callback) {
+ callback.Run(authpolicy::AUTH_USER_ERROR_NONE,
+ base::MD5String(user_principal_name));
+}
+
void FakeAuthPolicyClient::RefreshDevicePolicy(
const RefreshPolicyCallback& callback) {
if (!base::PostTaskAndReplyWithResult(
« no previous file with comments | « chromeos/dbus/fake_auth_policy_client.h ('k') | chromeos/login/auth/cryptohome_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698