getCurrentWindow abstract method
FutureOr<RateLimitingWindow<User> >
getCurrentWindow(
- RequestContext req,
- ResponseContext res,
- DateTime currentTime
Computes the current window in which the user is acting.
For example, if your API was limited to 1000 requests/hour, then you would return a window containing the current hour, and the number of requests the user has sent in the past hour.
Implementation
FutureOr<RateLimitingWindow<User>> getCurrentWindow(
RequestContext req, ResponseContext res, DateTime currentTime);