From a0f2c1f6d1470aa36ce90641a8ca2eb7b28a982f Mon Sep 17 00:00:00 2001 From: rwxd Date: Fri, 10 Nov 2023 14:43:12 +0100 Subject: [PATCH] Revert "fix(cache): token authentication lookup" This reverts commit 0d1547224ce331cf7710a0a3ba9046523a11aa35. --- powerdns_api_proxy/config.py | 2 -- powerdns_api_proxy/models.py | 8 -------- 2 files changed, 10 deletions(-) diff --git a/powerdns_api_proxy/config.py b/powerdns_api_proxy/config.py index 006fe92..7a43959 100644 --- a/powerdns_api_proxy/config.py +++ b/powerdns_api_proxy/config.py @@ -35,7 +35,6 @@ def load_config(path: Optional[Path] = None) -> ProxyConfig: return config -@lru_cache(maxsize=1000) def token_defined(config: ProxyConfig, token: str) -> bool: sha512 = hashlib.sha512() sha512.update(token.encode()) @@ -58,7 +57,6 @@ def dependency_check_token_defined( check_token_defined(load_config(), X_API_Key) -@lru_cache(maxsize=1000) def get_environment_for_token( config: ProxyConfig, token: str ) -> ProxyConfigEnvironment: diff --git a/powerdns_api_proxy/models.py b/powerdns_api_proxy/models.py index 46a059e..751efcc 100644 --- a/powerdns_api_proxy/models.py +++ b/powerdns_api_proxy/models.py @@ -133,14 +133,6 @@ def api_token_defined(cls, v): raise ValueError('pdns_api_token must a non-empty string') return v - def __hash__(self): - return hash( - self.pdns_api_url - + self.pdns_api_token - + str(self.pdns_api_verify_ssl) - + str(self.environments) - ) - class ResponseAllowed(BaseModel): zones: list[ProxyConfigZone]