fix: add APIKeyValidator class back to deps.py for backward compatibility with integration tests
Some checks failed
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Failing after 12m42s
Cross-Node Transaction Testing / transaction-test (push) Failing after 12m49s
Node Failover Simulation / failover-test (push) Failing after 12m58s
Python Tests / test-python (push) Failing after 13m3s
Integration Tests / test-service-integration (push) Failing after 13m29s

This commit is contained in:
aitbc
2026-05-06 07:59:33 +02:00
parent 274dd81c3d
commit 385ff0878c

View File

@@ -75,3 +75,15 @@ def get_session():
from .storage import get_session
return get_session()
# Legacy APIKeyValidator class for backward compatibility with tests
class APIKeyValidator:
"""Legacy API key validator class for backward compatibility."""
def __init__(self, allowed_keys: list[str]):
self.allowed_keys = allowed_keys
def __call__(self, api_key: str | None = None) -> str:
"""Validate API key."""
return _validate_api_key(self.allowed_keys, api_key)