diff --git a/flask_multipass_cern.py b/flask_multipass_cern.py index eaa38da..f2f1b5b 100644 --- a/flask_multipass_cern.py +++ b/flask_multipass_cern.py @@ -178,7 +178,7 @@ def get_members(self): ], } try: - results = self.provider._fetch_all(api_session, f'/api/v1.0/Group/{name}/memberidentities/precomputed', + results = self.provider._fetch_all(api_session, f'/api/v1.0/Group/{name}/members/identities/recursive', params)[0] except RequestException: self.provider.logger.warning('Refreshing members failed for group %s', name) @@ -425,7 +425,7 @@ def search_identities_ex(self, criteria, exact=False, limit=None): def _fetch_identity_group_names(self, identifier): with self._get_api_session() as api_session: identifier = identifier.replace('/', '%2F') # edugain identifiers sometimes contain slashes - resp = api_session.get(f'{self.authz_api_base}/api/v1.0/IdentityMembership/{identifier}/precomputed') + resp = api_session.get(f'{self.authz_api_base}/api/v1.0/identity/{identifier}/groups/recursive') if resp.status_code == 404: return set() resp.raise_for_status() diff --git a/tests/test_request_retry.py b/tests/test_request_retry.py index 15e9b81..69dcacb 100644 --- a/tests/test_request_retry.py +++ b/tests/test_request_retry.py @@ -13,7 +13,7 @@ def faster_retries(monkeypatch): @pytest.mark.usefixtures('httpretty_enabled', 'mock_get_api_session') def test_get_identity_groups_retry(provider): authz_api = provider.settings.get('authz_api') - test_uri = f'{authz_api}/api/v1.0/IdentityMembership/1/precomputed' + test_uri = f'{authz_api}/api/v1.0/identity/1/groups/recursive' httpretty.register_uri(httpretty.GET, test_uri, status=503) try: