From fb4ce0045491c9f26a25373bd0668ff9863797a1 Mon Sep 17 00:00:00 2001 From: "Shon T. Urbas" Date: Wed, 6 Dec 2017 11:52:12 -0500 Subject: [PATCH] revert back to payload --- keycloak/keycloak_admin.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/keycloak/keycloak_admin.py b/keycloak/keycloak_admin.py index 67fefcf..6c9e32b 100644 --- a/keycloak/keycloak_admin.py +++ b/keycloak/keycloak_admin.py @@ -168,7 +168,7 @@ class KeycloakAdmin: data_raw = self.connection.raw_get(URL_ADMIN_USER.format(**params_path)) return raise_error_from_response(data_raw, KeycloakGetError) - def update_user(self, user_id, username, email='', firstName='', lastName='', emailVerified=False, enabled=True): + def update_user(self, user_id, payload): """ Update the user @@ -177,12 +177,9 @@ class KeycloakAdmin: :return: Http response """ - data = {"username": username, "email": email, "firstName": firstName, "lastName": lastName, - "emailVerified": emailVerified, "enabled": enabled} - params_path = {"realm-name": self.realm_name, "id": user_id} data_raw = self.connection.raw_put(URL_ADMIN_USER.format(**params_path), - data=json.dumps(data)) + data=json.dumps(payload)) return raise_error_from_response(data_raw, KeycloakGetError, expected_code=204) def delete_user(self, user_id):