diff --git a/CHANGELOG.md b/CHANGELOG.md index e48d19cd..71bf9a7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] + +### Changed +- Remove unused insecure IN-CORE client [#581](https://github.com/IN-CORE/pyincore/issues/581) + + ## [1.19.0] - 2024-06-12 ### Changed diff --git a/docs/source/modules.rst b/docs/source/modules.rst index 41c35692..3e9d357e 100644 --- a/docs/source/modules.rst +++ b/docs/source/modules.rst @@ -575,8 +575,6 @@ client :members: .. autoclass:: client.IncoreClient :members: -.. autoclass:: client.InsecureIncoreClient - :members: dataservice =========== diff --git a/pyincore/__init__.py b/pyincore/__init__.py index 6e7b7e55..f0387038 100644 --- a/pyincore/__init__.py +++ b/pyincore/__init__.py @@ -8,7 +8,6 @@ # The order of import matters. You need to import module by order of dependency from pyincore.client import Client from pyincore.client import IncoreClient -from pyincore.client import InsecureIncoreClient from pyincore.hazardservice import HazardService from pyincore.utils.expressioneval import Parser from pyincore.utils.cge_ml_file_util import CGEMLFileUtil diff --git a/pyincore/client.py b/pyincore/client.py index 966f81c1..0267b1dd 100644 --- a/pyincore/client.py +++ b/pyincore/client.py @@ -422,24 +422,3 @@ def clear_cache(self): # clear entry from service.json update_hash_entry("edit", hashed_url=self.hashed_service_url) return - - -class InsecureIncoreClient(Client): - """IN-CORE service client class that bypasses Ambassador auth. It contains token and service root url. - - Args: - service_url (str): Service url. - username (str): Username string. - - """ - - def __init__(self, service_url: str = None, username: str = None): - super().__init__() - if service_url is None or len(service_url.strip()) == 0: - service_url = pyglobals.INCORE_API_PROD_URL - self.service_url = service_url - if username is None or len(username.strip()) == 0: - self.session.headers["x-auth-userinfo"] = pyglobals.INCORE_LDAP_TEST_USER_INFO - else: - user_info = "{\"preferred_username\": \"" + username + "\"}" - self.session.headers["x-auth-userinfo"] = user_info diff --git a/tests/pyincore/test_client.py b/tests/pyincore/test_client.py index fa77cdad..aa1243bf 100644 --- a/tests/pyincore/test_client.py +++ b/tests/pyincore/test_client.py @@ -8,7 +8,7 @@ import pytest import requests -from pyincore import Client, IncoreClient, InsecureIncoreClient, DataService +from pyincore import Client, IncoreClient, DataService def test_client_success(monkeypatch):