dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.33k stars 1.25k forks source link

Custom Throttle per users #1582

Closed khoude24 closed 5 years ago

khoude24 commented 6 years ago
Q A
Bug? no
New Feature? no
Framework Laravel
Framework version 5.5
Package version 2.0.0
PHP version 7.2.1

I would like to know if its possible to have a Custom Throttle rate limit per users. Admin can set differents limit for each user (in user table).

So, in a scenario, user1 can hit api 50 times, and user2 can hit api 100 time...

Can I do this with Dingo?

specialtactics commented 6 years ago

Of course it would be possible to implement, however as far as I know there is no default functionality like this.

You would want to write your own throttling middleware to do this.