User Authentication with Token and/or Cookie Support
'authentication.models.User' has the following basic fields
username, email, first_name, last_name, is_staff, is_active, date_joined, last_login
Add this to your settings:
- make sure admin app gets rollbacked to zero first
python manage.py migrate admin zero
- add to
INSTALLED_APPSafter 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')),
- do migrations
python manage.py migrate
Metadata
Release files for user-authentication-jr 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| user-authentication-jr-0.0.10.tar.gz | 6.5 kB | Without provenance | Details for user-authentication-jr-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| user_authentication_jr-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for user_authentication_jr-0.0.10-py3-none-any.whl |
Total release size: 15.5 kB
Release files / user-authentication-jr-0.0.10.tar.gz
| Download URL | user-authentication-jr-0.0.10.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da47d238d0625f4d39e3336bc36c9bf3bd916d7b2369b9c2540c90cd0a16dc5a
|
|
BLAKE2b-256 checksum How to use checksums |
3b68978a9eccff17e695608d18e5385562ea7ca4917bd26643247ea07e22296d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
|
Release files / user_authentication_jr-0.0.10-py3-none-any.whl
| Download URL | user_authentication_jr-0.0.10-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
023d22bfe4211e8830024bb2d10ec75d4f996769c7ebd9d6ae08900bdaf5037b
|
|
BLAKE2b-256 checksum How to use checksums |
a547919454d676b5367b890dda1fa6c547d8037ba43544abdfd018e106b76670
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
|
Security for user-authentication-jr 0.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.