I am using django-tastypie
for REST API and ApiKeyAuthentication
for authentication. I have a CreateUserResource
in api.py
for creating a new user. Now in all the tutorials it is specified that whenever any GET or POST request is done, apikey
must be specified. But how does the client receive this apikey
?
Is it that while logging in, client is to be authenticated and given an apikey
which is to be revoked when the client logs out?
For implementing the basic authentication in a single page app using Tastypie in backend:
Such authentication resource might look like: