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

Side by Side Diff: chromeos/dbus/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 unified diff | Download patch
« no previous file with comments | « chromeos/dbus/auth_policy_client.h ('k') | chromeos/dbus/fake_auth_policy_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 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/auth_policy_client.h" 4 #include "chromeos/dbus/auth_policy_client.h"
5 5
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "components/signin/core/account_id/account_id.h" 9 #include "components/signin/core/account_id/account_id.h"
10 #include "dbus/bus.h" 10 #include "dbus/bus.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 writer.AppendString(machine_name); 50 writer.AppendString(machine_name);
51 writer.AppendString(user_principal_name); 51 writer.AppendString(user_principal_name);
52 writer.AppendFileDescriptor(password_fd); 52 writer.AppendFileDescriptor(password_fd);
53 proxy_->CallMethod( 53 proxy_->CallMethod(
54 &method_call, kSlowDbusTimeoutMilliseconds, 54 &method_call, kSlowDbusTimeoutMilliseconds,
55 base::Bind(&AuthPolicyClientImpl::HandleJoinCallback, 55 base::Bind(&AuthPolicyClientImpl::HandleJoinCallback,
56 weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback))); 56 weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback)));
57 } 57 }
58 58
59 void AuthenticateUser(const std::string& user_principal_name, 59 void AuthenticateUser(const std::string& user_principal_name,
60 const std::string& object_guid,
60 int password_fd, 61 int password_fd,
61 AuthCallback callback) override { 62 AuthCallback callback) override {
62 dbus::MethodCall method_call(authpolicy::kAuthPolicyInterface, 63 dbus::MethodCall method_call(authpolicy::kAuthPolicyInterface,
63 authpolicy::kAuthPolicyAuthenticateUser); 64 authpolicy::kAuthPolicyAuthenticateUser);
64 dbus::MessageWriter writer(&method_call); 65 dbus::MessageWriter writer(&method_call);
65 writer.AppendString(user_principal_name); 66 writer.AppendString(user_principal_name);
67 writer.AppendString(object_guid);
66 writer.AppendFileDescriptor(password_fd); 68 writer.AppendFileDescriptor(password_fd);
67 proxy_->CallMethod( 69 proxy_->CallMethod(
68 &method_call, kSlowDbusTimeoutMilliseconds, 70 &method_call, kSlowDbusTimeoutMilliseconds,
69 base::Bind(&AuthPolicyClientImpl::HandleAuthCallback, 71 base::Bind(&AuthPolicyClientImpl::HandleAuthCallback,
70 weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback))); 72 weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback)));
71 } 73 }
72 74
73 void RefreshDevicePolicy(RefreshPolicyCallback callback) override { 75 void RefreshDevicePolicy(RefreshPolicyCallback callback) override {
74 dbus::MethodCall method_call(authpolicy::kAuthPolicyInterface, 76 dbus::MethodCall method_call(authpolicy::kAuthPolicyInterface,
75 authpolicy::kAuthPolicyRefreshDevicePolicy); 77 authpolicy::kAuthPolicyRefreshDevicePolicy);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 AuthPolicyClient::AuthPolicyClient() {} 159 AuthPolicyClient::AuthPolicyClient() {}
158 160
159 AuthPolicyClient::~AuthPolicyClient() {} 161 AuthPolicyClient::~AuthPolicyClient() {}
160 162
161 // static 163 // static
162 AuthPolicyClient* AuthPolicyClient::Create() { 164 AuthPolicyClient* AuthPolicyClient::Create() {
163 return new AuthPolicyClientImpl(); 165 return new AuthPolicyClientImpl();
164 } 166 }
165 167
166 } // namespace chromeos 168 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/auth_policy_client.h ('k') | chromeos/dbus/fake_auth_policy_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698