Skip to main content

A django app with token based authentication for both Session and API Token

Project description

User Authentication with Token and/or Cookie Support

This is an initial readme. Check out PYPI: https://pypi.org/project/user-authentication-jr/

Add this to your settings:

  • add to INSTALLED_APPS
   INSTALLED_APPS = [
   ...,
   'authentication',
   ]
  • to use the User model
  AUTH_USER_MODEL = 'authentication.User'
  • add authentication class

DEFAULT_AUTHENTICATION_CLASSES = [...., 'authentication.utils.token.ExpiringTokenAuthentication']
REST_FRAMEWORK_TOKEN_SECONDS_EXPIRY = 3600
  • add url entry for module to your urls.py
 path('auth/', include('authentication.urls')),

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

user-authentication-jr-0.0.4.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

user_authentication_jr-0.0.4-py3-none-any.whl (8.8 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