Skip to main content

Django token authentication

Project description

djangoauthtoken

Django auth solution for Token creation/updation for a session.

Add Djangoauthtoken in your project.

Add djangoauthtoken in your INSTALLED_APPS settings to see in action.

Add This seeting is your project

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': [
        'djangoauthtoken.middleware.CustomTokenAuthentication'
    ],
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'],
    'DEFAULT_RENDERER_CLASSES': [
        'rest_framework.renderers.JSONRenderer',
        'rest_framework.renderers.BrowsableAPIRenderer',
        'rest_framework_xml.renderers.XMLRenderer',
    ],
}

Run make migratons command:

python manage.py makemigrations djangoauthtoken

Run command to migrate:

python manage.py migrate

Run command to create superuser

python manage.py createsuperuser

Things to do:

  • Add api for Token.
  • Add api for login.
  • Add api for RefreshToken.
  • Add manager for create token.
  • Add serializer for user.
  • Add manager for create user.
  • Add api for user sign up.
  • Add github Actions.
  • Add pypi module push in this code base.
  • [] Add a custom command to delete invalid tokens.
  • [] Update README with screenshots and other details.

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

auth_token_django-0.2.5.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

auth_token_django-0.2.5-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file auth_token_django-0.2.5.tar.gz.

File metadata

  • Download URL: auth_token_django-0.2.5.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for auth_token_django-0.2.5.tar.gz
Algorithm Hash digest
SHA256 46b405201352f85a3c92edca4709b0e6201bce1b92c1ab3f3ca5cda10b326ee6
MD5 8b5e596af840340965f2b17fe9676625
BLAKE2b-256 3f7283b2c68619228087f857fb651c22f1fdf0c3b416c66472124bb617a71739

See more details on using hashes here.

File details

Details for the file auth_token_django-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for auth_token_django-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 742b1bffdcb7a714c767a6dab4f678c4783b7544686287701086a40168f9fd53
MD5 a63c18eb8dd9eeb3347c4e722b53a448
BLAKE2b-256 fc57d5f03f5045ea2b5405b0aa0df041672ffeccf27dc3e5bc0db9d9d50f0c06

See more details on using hashes here.

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