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 hashes)

Uploaded Source

Built Distribution

auth_token_django-0.2.5-py3-none-any.whl (16.9 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