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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5a5ed7f7392ff5e93b2ce7d25ed2a737b30f9afbdf18fcf6d57e0c019f12edd |
|
MD5 | db4774575372310778bc4a49c2a7ef76 |
|
BLAKE2b-256 | b0025c42d8b35657016c5e6625dc3bd46e9f59d0a98b4156c876392baab36d72 |
Close
Hashes for user_authentication_jr-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79029fa7fb36dea1f8f50f033b70f905d6e9479dabcf4ff8f7a55ac815e045fe |
|
MD5 | 8dcd293f2f238b0492888bb3168e33d6 |
|
BLAKE2b-256 | c56d7dacf8c51d26c2b6bb7b1ca5c02df5db059dfd51a2b916d2aa06620f2d09 |