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
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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f317f943052855000fc0ed57ca5a2dba735cd3d793cbdcf5dee4d3f3d96454a |
|
MD5 | d4994c8be52dfd7e53f04116f9336f2e |
|
BLAKE2b-256 | 078ee7480e2cb53110a47e1b979dad35ad4e844d5843fa425cf731d738e40bcb |
Close
Hashes for user_authentication_jr-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 644cc17419cc28b63e7ccae6f75149f92f66aac9b92daa378367303e9f390f95 |
|
MD5 | 2f72bc86b4e5c9112a2bd325200a9a8c |
|
BLAKE2b-256 | 7a2a87bed115ff6242e0f936b750243e26627441f26a0ba649cf5c8f1eba59d4 |