Skip to main content

No project description provided

Project description

Extensions for the djangorestframework-simplejwt library.

Settings

All pre-existing settings for djangorestframework-simplejwt are unchanged. The following settings are added and can be set in your settings.py file:

# Django project settings.py

...

SIMPLE_JWT = {
    ...
    'NEW_USER_CALLBACK': None,
}

NEW_USER_CALLBACK

A dot path to a callable that is used if the identifier from the token does not match a user in the database. Receives the request and the identifier as arguments. Should return None to fail authentication or a User object to succeed. Will only be used by the JWTAuthentication backend.

Backends

JWTTokenAuthentication

Use this instead of the djangorestframework-simplejwt JWTTokenAuthentication backend to take advantage of features added by this package.

Project details


Download files

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

Source Distribution

simplejwt-extensions-0.2.1.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

simplejwt_extensions-0.2.1-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page