fixing DQ issues

This commit is contained in:
2025-09-14 15:47:38 +02:00
parent 3eb18ef91e
commit 0ce708cf09
27 changed files with 430 additions and 214 deletions

View File

@@ -19,9 +19,10 @@ pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
class AuthManager:
"""JWT-based authentication manager with bcrypt password hashing"""
"""JWT-based authentication manager with bcrypt password hashing."""
def __init__(self):
"""Class constructor."""
self.secret_key = os.getenv(
"JWT_SECRET_KEY", "your-secret-key-change-in-production-please"
)

View File

@@ -11,6 +11,7 @@ class RateLimiter:
"""In-memory rate limiter using sliding window"""
def __init__(self):
"""Class constructor."""
# Dictionary to store request timestamps for each client
self.clients: Dict[str, deque] = defaultdict(lambda: deque())
self.cleanup_interval = 3600 # Clean up old entries every hour