Rate Limit¶
rate_limit
¶
In-memory rate limiting implementation.
Provides a simple sliding window rate limiter for protecting authentication endpoints from brute force attacks.
Classes¶
RateLimitExceeded
¶
Bases: Exception
Raised when rate limit is exceeded.
RateLimiter
¶
Sliding window rate limiter for authentication endpoints.
Source code in fastauth/security/rate_limit.py
Functions¶
hit
¶
Register an attempt for a given key. Raises RateLimitExceeded if limit is exceeded.