Adds JSON Web Token obtain, refresh, verify, and blacklist flows to Django REST Framework APIs with configurable claims and serializers.
Overview
Simple JWT is an authentication plugin for Django REST Framework. It provides backends and views that issue and validate JSON Web Tokens so API clients can authenticate without server sessions, covering common access and refresh token patterns out of the box.
Defaults aim at a conservative feature set while remaining extensible: token lifetimes, rotation and blacklist behavior, signing algorithms, headers, user identity claims, and custom serializers can be tuned through settings. Access and refresh token types, sliding tokens, and a blacklist app are documented for projects that need revocation or sliding sessions.
Integration follows Django REST Framework patterns with authentication classes such as JWTAuthentication and optional stateless user authentication. Token obtain, refresh, verify, and blacklist views ship ready to wire into URL routes, and manual token creation hooks exist for programmatic use.
The project documents installation, project configuration, and optional cryptographic dependencies. It acknowledges prior art from Django REST Framework and django-rest-framework-jwt in its license notes.
Key features
- JWT obtain, refresh, and verify views
- Configurable access and refresh lifetimes
- Refresh rotation and blacklist options
- Custom claims and signing settings
- Access and sliding token classes
- JWTAuthentication for DRF requests
- Stateless user authentication backend
- Extensible token serializers
Use cases
- Protect Django REST APIs with bearer tokens
- Issue short-lived access and refresh pairs
- Rotate refresh tokens and revoke old ones
- Authenticate SPA or mobile API clients
- Tune JWT claims for multi-tenant APIs