Simple JWT
A JSON Web Token authentication plugin for the Django REST Framework.
Simple JWT provides a JSON Web Token authentication backend for the Django REST Framework. It aims to cover the most common use cases of JWTs by offering a conservative set of default features. It also aims to be easily extensible in case a desired feature is not present.
Acknowledgments
This project borrows code from the Django REST Framework as well as concepts from the implementation of another JSON web token library for the Django REST Framework, django-rest-framework-jwt. The licenses from both of those projects have been included in this repository in the “licenses” directory.
Contents
- Getting started
- Settings
ACCESS_TOKEN_LIFETIME
REFRESH_TOKEN_LIFETIME
ROTATE_REFRESH_TOKENS
BLACKLIST_AFTER_ROTATION
UPDATE_LAST_LOGIN
TOKEN_FAMILY_ENABLED
TOKEN_FAMILY_LIFETIME
TOKEN_FAMILY_CHECK_ON_ACCESS
TOKEN_FAMILY_BLACKLIST_ON_REUSE
ALGORITHM
SIGNING_KEY
VERIFYING_KEY
AUDIENCE
ISSUER
JWK_URL
LEEWAY
SJWT_CACHE_NAME
CACHE_BLACKLISTED_REFRESH_TOKENS
CACHE_BLACKLISTED_FAMILIES
CACHE_TTL_BLACKLISTED_REFRESH_TOKENS
CACHE_TTL_BLACKLISTED_FAMILIES
CACHE_KEY_PREFIX_BLACKLISTED_REFRESH_TOKENS
CACHE_KEY_PREFIX_BLACKLISTED_FAMILIES
AUTH_HEADER_TYPES
AUTH_HEADER_NAME
USER_ID_FIELD
USER_ID_CLAIM
USER_AUTHENTICATION_RULE
AUTH_TOKEN_CLASSES
TOKEN_TYPE_CLAIM
JTI_CLAIM
TOKEN_FAMILY_CLAIM
TOKEN_FAMILY_EXPIRATION_CLAIM
TOKEN_USER_CLASS
SLIDING_TOKEN_LIFETIME
SLIDING_TOKEN_REFRESH_LIFETIME
SLIDING_TOKEN_REFRESH_EXP_CLAIM
CHECK_REVOKE_TOKEN
REVOKE_TOKEN_CLAIM
- Customizing token claims
- Creating tokens manually
- Token types
- Blacklist app
- Family app
- Stateless User Authentication
- Cache Support
- Development and contributing
drf-yasg
Integration- rest_framework_simplejwt package