Django password expiration app
This app provides configurable expiration of passwords.
Features
- Configurable password duration and warning duration
- Visual warning to user using Django messages
- Prevents user from logging in after expiration
Requirements
This Django app requires Python >= 3.6 and has been tested with Django 2.2, 3.1, and 3.2.
Installation
pip install django-password-expire.- Add
password_expiretoINSTALLED_APPS. - Add
'password_expire.middleware.PasswordExpireMiddleware'toMIDDLEWARE. It should be listed after authentication and session middlewares. - Configure the app in your settings:
# contact information if password is expired PASSWORD_EXPIRE_CONTACT = "John Doe <jdoe@example.com>" # expire passwords after 90 days PASSWORD_EXPIRE_SECONDS = 90 * 24 * 60 * 60 # start warning 10 days before expiration PASSWORD_EXPIRE_WARN_SECONDS = 10 * 24 * 60 * 60
- Run
python manage.py migrateto create the required database tables.
To redirect new users to the change password page, set this flag in the settings:
PASSWORD_EXPIRE_FORCE = True
If you want to exclude superusers from the password expiration, set this flag:
PASSWORD_EXPIRE_EXCLUDE_SUPERUSERS = True
Acknowledgements
This app is inspired by django-password-policies-iplweb.
Metadata
Release files for django-password-expire 0.2
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 | |
|---|---|---|---|---|
| django-password-expire-0.2.tar.gz | 6.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_password_expire-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / django-password-expire-0.2.tar.gz
| Download URL | django-password-expire-0.2.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
280e04ac0f1110848e24ea46b9571fb6c62ea0995018364121c52e6fb05a7dd6
|
|
BLAKE2b-256 checksum How to use checksums |
60818c2bf4dd14024c0a15338786bd77bb39c5653675216fc12fd6fb4c3d6c6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|
Release files / django_password_expire-0.2-py3-none-any.whl
| Download URL | django_password_expire-0.2-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d93e656a22b612161316e1db11c58740857f3b61e317febe71eaa06a36be97f
|
|
BLAKE2b-256 checksum How to use checksums |
ec5c156b382d92d1a8d1cfd1b9fb35f2380edec265a10c33b0151fe8e560fdb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|
Security for django-password-expire 0.2
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.