From a6be049338a74eafe3feee1f73d6d2f60d35ceed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Mui=CC=81n=CC=83o=20Garci=CC=81a?= Date: Wed, 9 Jul 2025 13:12:49 +0200 Subject: [PATCH] Do not allow to configure authUrl Right now is always build from baseUrl --- yepcode_run/api/types.py | 1 - yepcode_run/api/yepcode_api.py | 5 +---- yepcode_run/types.py | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/yepcode_run/api/types.py b/yepcode_run/api/types.py index 42d4039..80b96b2 100644 --- a/yepcode_run/api/types.py +++ b/yepcode_run/api/types.py @@ -20,7 +20,6 @@ class ExecutionStatus(Enum): @dataclass class YepCodeApiConfig: - auth_url: Optional[str] = None api_host: Optional[str] = None timeout: Optional[int] = None access_token: Optional[str] = None diff --git a/yepcode_run/api/yepcode_api.py b/yepcode_run/api/yepcode_api.py index 7733e2f..cdd767c 100644 --- a/yepcode_run/api/yepcode_api.py +++ b/yepcode_run/api/yepcode_api.py @@ -107,7 +107,6 @@ def __init__(self, config: YepCodeApiConfig = None): self.client_id = final_config.get("client_id") self.client_secret = final_config.get("client_secret") self.api_token = final_config.get("api_token") - self.auth_url = final_config.get("auth_url") self.team_id = final_config.get("team_id") self.access_token = final_config.get("access_token") self.timeout = final_config.get("timeout") @@ -115,8 +114,6 @@ def __init__(self, config: YepCodeApiConfig = None): self.client_id = self._client_id_from_access_token() if not self.team_id and self.client_id: self.team_id = self._team_id_from_client_id() - if not self.auth_url: - self.auth_url = self._get_auth_url() def get_client_id(self) -> str: if not self.client_id: @@ -170,7 +167,7 @@ def _get_access_token(self) -> str: ) response = requests.post( - self.auth_url, + self._get_auth_url(), headers={ "x-api-token": api_token, }, diff --git a/yepcode_run/types.py b/yepcode_run/types.py index f4dc523..692a2f9 100644 --- a/yepcode_run/types.py +++ b/yepcode_run/types.py @@ -14,7 +14,6 @@ class ExecutionStatus(Enum): @dataclass class YepCodeApiConfig: - auth_url: Optional[str] = None api_host: Optional[str] = None timeout: Optional[int] = None access_token: Optional[str] = None