fixing DQ issues
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user