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

Side by Side Diff: chromeos/dbus/fake_auth_policy_client.cc

Issue 2519823006: Chromad: Add authentication flow (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #include "chromeos/dbus/fake_auth_policy_client.h" 4 #include "chromeos/dbus/fake_auth_policy_client.h"
5 5
6 #include "base/md5.h"
7
6 namespace chromeos { 8 namespace chromeos {
7 9
8 FakeAuthPolicyClient::FakeAuthPolicyClient() {} 10 FakeAuthPolicyClient::FakeAuthPolicyClient() {}
9 11
10 FakeAuthPolicyClient::~FakeAuthPolicyClient() {} 12 FakeAuthPolicyClient::~FakeAuthPolicyClient() {}
11 13
12 void FakeAuthPolicyClient::Init(dbus::Bus* bus) {} 14 void FakeAuthPolicyClient::Init(dbus::Bus* bus) {}
13 15
14 void FakeAuthPolicyClient::JoinAdDomain(const std::string& machine_name, 16 void FakeAuthPolicyClient::JoinAdDomain(const std::string& machine_name,
15 const std::string& user, 17 const std::string& user_principal_name,
16 int password_fd, 18 int password_fd,
17 const JoinCallback& callback) { 19 const JoinCallback& callback) {
18 callback.Run(authpolicy::AD_JOIN_ERROR_NONE); 20 callback.Run(authpolicy::AD_JOIN_ERROR_NONE);
19 } 21 }
20 22
23 void FakeAuthPolicyClient::AuthenticateUser(
24 const std::string& user_principal_name,
25 int password_fd,
26 const AuthCallback& callback) {
27 callback.Run(authpolicy::AUTH_USER_ERROR_NONE,
28 base::MD5String(user_principal_name));
29 }
30
21 void FakeAuthPolicyClient::RefreshDevicePolicy( 31 void FakeAuthPolicyClient::RefreshDevicePolicy(
22 const RefreshPolicyCallback& callback) { 32 const RefreshPolicyCallback& callback) {
23 callback.Run(true); 33 callback.Run(true);
24 }; 34 }
25 35
26 void FakeAuthPolicyClient::RefreshUserPolicy( 36 void FakeAuthPolicyClient::RefreshUserPolicy(
27 const std::string& account_id, 37 const std::string& account_id,
28 const RefreshPolicyCallback& callback) { 38 const RefreshPolicyCallback& callback) {
29 callback.Run(true); 39 callback.Run(true);
30 }; 40 }
31 41
32 } // namespace chromeos 42 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698