[Django]-TastyPie throttling – by user or by IP?

2👍

Throttle key is based on authentication.get_identifier function.

Default implementation of this function returns a combination of IP address and hostname.

Edit

Other implementations (i.e. BasicAuthentication, ApiKeyAuthentication) returns username of the currently logged user or nouser string.

2👍

Tomasz is mostly right, but some of the authentication classes have a get_identifier method that returns the username of the currently logged in user, otherwise ‘nouser’. I plan on standardizing this soon.

Leave a comment