Reputation: 765
I have a large user base for my app, and i use "tastypie" to develop APIs for the backend. I am trying to move to django rest framework.
I have been using ApiKeyAuthentication of tastypie which generates an apikey when a new auth_user is created. How do i port this whole authentication mechanism to django rest framework.
Upvotes: 0
Views: 458
Reputation: 20966
Django REST framework provides a basic token authentication. You need to create the token for the user - easily doable via signals - and configure DRF to use the token auth.
The documentation should provides everything you need at http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication
If not, let us know how we can improve it :)
Upvotes: 2