Implements a simple token authentication scheme including enpoints /register, /login, /logout and /logoutall.
/register and /login return a json object like this:
Authorization can be disabled for an endpoint for testing in the views.py by annotating the function with @permission_classes([AllowAny]) (Example here, uncomment the line).
The logged-in user is accessible in the backend via request.user.
Implements a simple token authentication scheme including enpoints
/register
,/login
,/logout
and/logoutall
./register
and/login
return a json object like this:The token needs to be sent in the Authorization header with
Token
as a Prefix like this:Authorization can be disabled for an endpoint for testing in the views.py by annotating the function with
@permission_classes([AllowAny])
(Example here, uncomment the line).The logged-in user is accessible in the backend via
request.user
.closes #17 closes #113