Skip to main content

simple jwt handling for django REST Framework

Project description


JSON Web Token plugin for Django REST Framework


pip install .

let jwt do the authentification:

add 'drf_jwt.authentication.JSONWebTokenAuthentication' in authentication classes:


make endpoints to login, get the jwt:

from drf_jwt.controllers import Auth

urlpatterns = [
    path('api/login', Auth.as_view()),

suport GET and POST


{ login, password }

login will be the username of the "authenticate" function


return a JWT token, given the fact that you are authenticate

so, one could do a Basic Authentication to the GET endpoints to receve a JWT

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-rest-jwt, version 0.1.40
Filename, size File type Python version Upload date Hashes
Filename, size django_rest_jwt-0.1.40-py3-none-any.whl (5.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-rest-jwt-0.1.40.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page