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

Unified Diff: chromeos/dbus/fake_auth_policy_client.cc

Issue 2519823006: Chromad: Add authentication flow (Closed)
Patch Set: Fix profile creation, mojo types + rebase. 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
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..c1766ec1003b98fd4b532fe48925c855446ff42e 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::types::AUTH_USER_ERROR_NONE,
+ base::MD5String(user_principal_name));
+}
+
void FakeAuthPolicyClient::RefreshDevicePolicy(
const RefreshPolicyCallback& callback) {
if (!base::PostTaskAndReplyWithResult(

Powered by Google App Engine
This is Rietveld 408576698