django-oauth-toolkit
django-oauth-toolkit copied to clipboard
Oauth2 Throttle class for Client Credentials
Is your feature request related to a problem? Please describe. I am using Django Rest framework and Django Oauth Toolkit. When you request drf endpoint with Client Credentials Oauth2, request.user is None.
This is a problem with standard Throttle class because they are using request.user in get_cache_key function.
You have to use custom Throttle class to implement throttling on the endpoint.
Describe the solution you'd like Create Django Oauth toolkit throttling class to manage None user case
Describe alternatives you've considered Create my own custom Throttling class or set an empty throttling class in drf viewset
If my proposal is not relevant, I will be happy to discuss !
Thank you for your response and your top library, Nicolas