RateLimitService
Defined in: packages/auth/src/ratelimit/rate-limit.service.ts:53
Fixed-window rate limiter. The window is anchored at the first request in each window (the store applies the TTL on the first increment), so a key that goes quiet naturally resets when its TTL elapses.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RateLimitService(
store,options):RateLimitService
Defined in: packages/auth/src/ratelimit/rate-limit.service.ts:57
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”RateLimitService
Methods
Section titled “Methods”consume()
Section titled “consume()”consume(
params):Promise<RateLimitResult>
Defined in: packages/auth/src/ratelimit/rate-limit.service.ts:65
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<RateLimitResult>