diff --git a/src/keycloak/keycloak_admin.py b/src/keycloak/keycloak_admin.py index 12350a8..66c1fe6 100644 --- a/src/keycloak/keycloak_admin.py +++ b/src/keycloak/keycloak_admin.py @@ -2844,18 +2844,6 @@ class KeycloakAdmin: data_raw = self.raw_get(urls_patterns.URL_ADMIN_CLIENT_ROLE_CHILDREN.format(**params_path)) return raise_error_from_response(data_raw, KeycloakGetError) - def get_user_credentials(self, user_id): - """Get the credentials of the given user. - - :param user_id: id of the user. - :type user_id: str - :return: the user credentials (list of CredentialsRepresentation). - :rtype: list - """ - params_path = {"realm-name": self.realm_name, "id": user_id} - data_raw = self.raw_get(urls_patterns.URL_ADMIN_USER_CREDENTIALS.format(**params_path)) - return raise_error_from_response(data_raw, KeycloakGetError) - def upload_certificate(self, client_id, certcont): """Upload a new certificate for the client. diff --git a/tests/test_keycloak_admin.py b/tests/test_keycloak_admin.py index c4ba3d8..6d62f22 100644 --- a/tests/test_keycloak_admin.py +++ b/tests/test_keycloak_admin.py @@ -1880,16 +1880,6 @@ def test_get_role_client_level_children( assert child["id"] in [x["id"] for x in res] -def test_get_user_credentials(admin: KeycloakAdmin, realm: str, user: str): - """Test get user credentials.""" - admin.realm_name = realm - admin.set_user_password(user, "pwd", temporary=False) - res = admin.get_user_credentials(user) - assert isinstance(res, list) - assert len(res) == 1 - assert res[0]["type"] == "password" - - def test_upload_certificate(admin: KeycloakAdmin, realm: str, client: str, selfsigned_cert: tuple): """Test upload certificate.""" admin.realm_name = realm