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

Unified Diff: chromeos/dbus/auth_policy_client.h

Issue 2519823006: Chromad: Add authentication flow (Closed)
Patch Set: Rename HandleAdAuth. Use system_api enums 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
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/auth_policy_client.h
diff --git a/chromeos/dbus/auth_policy_client.h b/chromeos/dbus/auth_policy_client.h
index 1947b4a5d1d67a945d1abc0b374c8dd2c5b6df84..2ebc05c5ca995654b7fbd3967782d6f0068e6894 100644
--- a/chromeos/dbus/auth_policy_client.h
+++ b/chromeos/dbus/auth_policy_client.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "chromeos/chromeos_export.h"
#include "chromeos/dbus/dbus_client.h"
+#include "third_party/cros_system_api/dbus/service_constants.h"
// TODO(rsorokin): Switch to service constants when it's landed.
// (see crbug.com/659732)
@@ -30,6 +31,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(authpolicy::AuthUserErrorType error,
+ const std::string& user_id)>;
using JoinCallback = base::Callback<void(int error_code)>;
using RefreshPolicyCallback = base::Callback<void(bool success)>;
@@ -41,16 +46,24 @@ class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient {
// Calls JoinADDomain. It runs "net ads join ..." which joins machine to
// Active directory domain.
- // |machine_name| is a name for a local machine. |user|,
+ // |machine_name| is a name for a local machine. |user_principal_name|,
// |password_fd| are credentials of the Active directory account which has
// right to join the machine to the domain. |password_fd| is a file descriptor
// password is read from. The caller should close it after the call.
- // |callback| is called after the method call succeeds.
+ // |callback| is called after getting (or failing to get) D-BUS response.
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 getting (or failing to get) D-BUS response.
+ 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.
« 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