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

Side by Side Diff: chromeos/dbus/auth_policy_client.h

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
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 4
5 #ifndef CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_
6 #define CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ 6 #define CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // |password_fd| are credentials of the Active directory account which has 42 // |password_fd| are credentials of the Active directory account which has
43 // right to join the machine to the domain. |password_fd| is a file descriptor 43 // right to join the machine to the domain. |password_fd| is a file descriptor
44 // password is read from. The caller should close it after the call. 44 // password is read from. The caller should close it after the call.
45 // |callback| is called after getting (or failing to get) D-BUS response. 45 // |callback| is called after getting (or failing to get) D-BUS response.
46 virtual void JoinAdDomain(const std::string& machine_name, 46 virtual void JoinAdDomain(const std::string& machine_name,
47 const std::string& user_principal_name, 47 const std::string& user_principal_name,
48 int password_fd, 48 int password_fd,
49 JoinCallback callback) = 0; 49 JoinCallback callback) = 0;
50 50
51 // Calls AuthenticateUser. It runs "kinit <user_principal_name> .. " which 51 // Calls AuthenticateUser. It runs "kinit <user_principal_name> .. " which
52 // does kerberos authentication against Active Directory server. 52 // does kerberos authentication against Active Directory server. If
53 // |password_fd| is similar to the one in the JoinAdDomain. 53 // |object_guid| is not empty authpolicy service first does ldap search by
54 // |callback| is called after getting (or failing to get) D-BUS response. 54 // that |object_guid| for samAccountName and uses it for kinit. |password_fd|
55 // is similar to the one in the JoinAdDomain. |callback| is called after
56 // getting (or failing to get) D-BUS response.
55 virtual void AuthenticateUser(const std::string& user_principal_name, 57 virtual void AuthenticateUser(const std::string& user_principal_name,
58 const std::string& object_guid,
56 int password_fd, 59 int password_fd,
57 AuthCallback callback) = 0; 60 AuthCallback callback) = 0;
58 61
59 // Calls RefreshDevicePolicy - handle policy for the device. 62 // Calls RefreshDevicePolicy - handle policy for the device.
60 // Fetch GPO files from Active directory server, parse it, encode it into 63 // Fetch GPO files from Active directory server, parse it, encode it into
61 // protobuf and send to SessionManager. Callback is called after that. 64 // protobuf and send to SessionManager. Callback is called after that.
62 virtual void RefreshDevicePolicy(RefreshPolicyCallback callback) = 0; 65 virtual void RefreshDevicePolicy(RefreshPolicyCallback callback) = 0;
63 66
64 // Calls RefreshUserPolicy - handle policy for the user specified by 67 // Calls RefreshUserPolicy - handle policy for the user specified by
65 // |account_id|. Similar to RefreshDevicePolicy. 68 // |account_id|. Similar to RefreshDevicePolicy.
66 virtual void RefreshUserPolicy(const AccountId& account_id, 69 virtual void RefreshUserPolicy(const AccountId& account_id,
67 RefreshPolicyCallback callback) = 0; 70 RefreshPolicyCallback callback) = 0;
68 71
69 protected: 72 protected:
70 // Create() should be used instead. 73 // Create() should be used instead.
71 AuthPolicyClient(); 74 AuthPolicyClient();
72 75
73 private: 76 private:
74 DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient); 77 DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient);
75 }; 78 };
76 79
77 } // namespace chromeos 80 } // namespace chromeos
78 81
79 #endif // CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ 82 #endif // CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc ('k') | chromeos/dbus/auth_policy_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698