Reputation: 585
I have a machine learning model which I have converted as a Rest API using Django rest framework. Now I want to distribute the API to users but how can I authenticate and limit the requests by the users by allowing them to interact the api using an api key?. And also I want to mask the URL of the API before giving to the users how can I do this in django rest framework.
Upvotes: 1
Views: 312
Reputation: 352
If you have full control of the requirements I would consider using JWT tokens. A simple library to do this is Simple Jwt, follow the steps in the wiki to configure it.
To rate limit check Django Rest Framework Throttling module.
Upvotes: 1