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
after admin, auth and contenttypes
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
...,
'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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for user-authentication-jr-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5345e63a04d57715576ae00bdb4941cf524401644f3000f1d17e9e8afbb92747 |
|
MD5 | da2c3b8a529c1ff672b1f0929bfec856 |
|
BLAKE2b-256 | 3b54c5083f743d173ae8fe47d820cd901d2496ca03042fc59cc6a411334de414 |
Close
Hashes for user_authentication_jr-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65b7d2b660295f53d64b6a67c0c268087cdb4105f7cfc7fbfc03d50a46dd550d |
|
MD5 | a79c1a33e804646295f9a67e97b43cdd |
|
BLAKE2b-256 | 8a19a879621ca5ae5db5b168b2a4c8bd843e9cac11398522cb9a8a8e7df1aa85 |