diff --git a/keycloak/keycloak_admin.py b/keycloak/keycloak_admin.py index 429a93e..5d57661 100644 --- a/keycloak/keycloak_admin.py +++ b/keycloak/keycloak_admin.py @@ -685,6 +685,20 @@ class KeycloakAdmin: data=json.dumps(payload)) return raise_error_from_response(data_raw, KeycloakGetError, expected_code=201, skip_exists=skip_exists) + def update_client(self, client_id, payload): + """ + Update a client + + :param client_id: Client id + :param payload: ClientRepresentation + + :return: Http response + """ + params_path = {"realm-name": self.realm_name, "id": client_id} + data_raw = self.connection.raw_put(URL_ADMIN_CLIENT.format(**params_path), + data=json.dumps(payload)) + return raise_error_from_response(data_raw, KeycloakGetError, expected_code=204) + def delete_client(self, client_id): """ Get representation of the client