AuthRateLimitMiddleware
in package
implements
MiddlewareInterface
Rate limiting middleware specifically for web authentication routes.
Applies 10 requests per 5 minutes limit to login, register, and password reset endpoints.
Tags
Table of Contents
Interfaces
- MiddlewareInterface
- Interface for route middleware.
Constants
Properties
Methods
- __construct() : mixed
- handle() : bool
- Handle the incoming request.
- getClientIdentifier() : string
Constants
LIMIT
private
mixed
LIMIT
= 10
WINDOW
private
mixed
WINDOW
= 300
Properties
$storage
private
RateLimitStorage
$storage
Methods
__construct()
public
__construct([RateLimitStorage|null $storage = null ]) : mixed
Parameters
- $storage : RateLimitStorage|null = null
handle()
Handle the incoming request.
public
handle() : bool
Return values
bool —True if the request should continue, false to halt
getClientIdentifier()
private
getClientIdentifier() : string