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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37deeeb9689279dddc300854175b4122d5f3c06a78ed024beeaa3962b11d3e48 |
|
MD5 | c196e063a30539b27e172d51685b4e01 |
|
BLAKE2b-256 | 301862606e4512f4bc705697ce2590174e274739453f51de060d8a0b712b2651 |
Close
Hashes for user_authentication_jr-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01b719594b6455fc12438b7bfcafdd54ffd149dbea3b87d441cf88cb59ef76d5 |
|
MD5 | 3e5c5e20fbb38f4fa1315c8a47c1b10d |
|
BLAKE2b-256 | 770801f4977a9bfe4a72a9948a15bc76ffc74b9b1e107a38975ef7330490d652 |