JSON Web Token Authentication for Django
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Brian Salcedo 3ca601898f unify django / drf 1 month ago
django_yajwt unify django / drf 1 month ago
.gitignore initial commit 1 month ago
Pipfile hash out initial middleware and auth class 1 month ago
Pipfile.lock hash out initial middleware and auth class 1 month ago
README.md update readme 1 month ago
requirements.txt attempt multipurpose class 1 month ago
setup.py add setup.py 1 month ago

README.md

Django Yet Another JSON Web Token Middleware

YAJWT = {
    # Required
    'SECRET_KEY': 'muchsecretmanysecure',
    'COOKIE_DOMAIN': 'example.com',

    # Optional
    'COOKIE_EXPIRES': timedelta(hours=1) # same as REFRESH_LIFETIME if not set
    'COOKIE_NAME': 'refreshtoken',
    'COOKIE_PATH': '/',
    'COOKIE_SECURE': True,
    'COOKIE_SAMESITE': 'Stict',
    'TOKEN_PREFIX': 'Bearer',
    'ALGORITHM': 'HS256',
    'ACCESS_LIFETIME': timedelta(minutes=15),
    'REFRESH_LIFETIME': timedelta(hours=1),
}