Chromium Code Reviews| Index: chromeos/dbus/auth_policy_client.h |
| diff --git a/chromeos/dbus/auth_policy_client.h b/chromeos/dbus/auth_policy_client.h |
| index 740d6af3bd2ebfbeff215c48edfde2b3a19c9de9..a908c4ebefa073dac16f4fa6a245a18b9da147cf 100644 |
| --- a/chromeos/dbus/auth_policy_client.h |
| +++ b/chromeos/dbus/auth_policy_client.h |
| @@ -19,7 +19,13 @@ enum ADJoinErrorType { |
| AD_JOIN_ERROR_UNKNOWN = 1, |
| AD_JOIN_ERROR_DBUS_FAIL = 2, |
| }; |
| -} |
| + |
| +enum AuthUserErrorType { |
| + AUTH_USER_ERROR_NONE = 0, |
| + AUTH_USER_ERROR_UNKNOWN = 1, |
| + AUTH_USER_ERROR_DBUS_FAILURE = 2, |
| +}; |
|
hashimoto
2016/11/28 03:28:50
ditto.
Roman Sorokin (ftl)
2016/12/02 12:35:12
Done.
|
| +} // namespace authpolicy |
| namespace chromeos { |
| @@ -28,6 +34,10 @@ namespace chromeos { |
| // initializes the DBusThreadManager instance. |
| class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient { |
| public: |
| + // |user_id| is a unique id for the users. Using objectGUID from Active |
| + // Directory server. |
| + using AuthCallback = |
| + base::Callback<void(int error_code, const std::string& user_id)>; |
| using JoinCallback = base::Callback<void(int error_code)>; |
| using RefreshPolicyCallback = base::Callback<void(bool success)>; |
| @@ -45,10 +55,18 @@ class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient { |
| // password is read from. The caller should close it after the call. |
| // |callback| is called after the method call succeeds. |
| virtual void JoinAdDomain(const std::string& machine_name, |
| - const std::string& user, |
| + const std::string& user_principal_name, |
| int password_fd, |
| const JoinCallback& callback) = 0; |
| + // Calls AuthenticateUser. It runs "kinit <user_principal_name> .. " which |
| + // does kerberos authentication against Active Directory server. |
| + // |password_fd| is similar to the one in the JoinAdDomain. |
| + // |callback| is called after the method call succeeds. |
|
xiyuan
2016/11/28 23:43:05
Think |callback| is invoked when auth fails as wel
Roman Sorokin (ftl)
2016/12/02 12:35:12
Done.
|
| + virtual void AuthenticateUser(const std::string& user_principal_name, |
| + int password_fd, |
| + const AuthCallback& callback) = 0; |
| + |
| // Calls RefreshDevicePolicy - handle policy for the device. |
| // Fetch GPO files from Active directory server, parse it, encode it into |
| // protobuf and send to SessionManager. Callback is called after that. |