Skip to content

Commit

Permalink
Merge pull request #5 from akquinet/caching
Browse files Browse the repository at this point in the history
Revert "fix(cache): token authentication lookup"
  • Loading branch information
rwxd authored Nov 10, 2023
2 parents 47b0066 + a0f2c1f commit 58c2964
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions powerdns_api_proxy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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:
Expand Down
8 changes: 0 additions & 8 deletions powerdns_api_proxy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 58c2964

Please sign in to comment.