Extends Django password validation options to include minimum uppercase, lowercase, numerical, and special characters.
Project description
django-advanced_password_validation
Extends Django password validation options to include minimum uppercase, minimum lowercase, minimum numerical, and minimum special characters. This was created in an attempt to keep up with industry standards for strong user passwords.
This package works for both python 3.x and 2.x versions.
NOTE: As of January 01, 2020 python 2.x has been deprecated and will no longer receive continued support. See Python 2.x EOL for more details.
Prerequisites
Requires Django 1.11 or later. You can install the latest version of Django via pip:
$ pip install django
Alternatively, you can install a specific version of Django via pip:
$ pip install django=2.2
NOTE: See the django-project documentation for information on non-deprecated Django versions.
Installation
Normal installation
Install django-advanced_password_validation via pip:
$ pip install django-advanced_password_validation
Development installation
$ git clone https://github.com/ezrajrice/django-advanced_password_validation.git
$ cd django-advanced_password_validation
$ pip install --editable .
Usage
The four optional validators must be configured in the settings.py file of your django project.
/my-cool-project/settings.py
INSTALLED_APPS = [
...
'django-advanced_password_validation',
...
]
AUTH_PASSWORD_VALIDATORS = [
...
{
'NAME': 'django-advanced_password_validation.advanced_password_validation.ContainsNumeralsValidator',
'OPTIONS': {
'min_numerals': 1
}
},
{
'NAME': 'django-advanced_password_validation.advanced_password_validation.ContainsUppercaseValidator',
'OPTIONS': {
'min_uppercase': 1
}
},
{
'NAME': 'django-advanced_password_validation.advanced_password_validation.ContainsLowercaseValidator',
'OPTIONS': {
'min_lowercase': 1
}
},
{
'NAME': 'django-advanced_password_validation.advanced_password_validation.ContainsSpecialCharactersValidator',
'OPTIONS': {
'min_characters': 1
}
},
...
]
Options
Here is a list of the available options with their default values.
Validator | Option | Default |
---|---|---|
ContainsNumeralsValidator | min_numerals | 1 |
ContainsUppercaseValidator | min_uppercase | 1 |
ContainsLowercaseValidator | min_lowercase | 1 |
ContainsSpecialCharactersValidator | min_characters | 1 |
Authors
- Ezra Rice - Initial work - ezrajrice
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
VERSION HISTORY
VERSION 1.0.3 - 2020-03-20
Added
- ContainsNumeralsValidator
- ContainsUppercaseValidator
- ContainsLowercaseValidator
- ContainsSpecialCharactersValidator
Project details
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
Hashes for django-advanced_password_validation-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba10d785a4fad94490a5c389bb541a05b95ebe39865afcf92fd909146e4d7047 |
|
MD5 | ff82526b9b4e9cf298cb2c82586caacc |
|
BLAKE2b-256 | e92bdb5ecbe1639634d552849c94aca35f6a859e24f5a7717fb898c899051d4f |
Hashes for django_advanced_password_validation-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94d0955a6641bfcfc26ed56fe13a1c96a3cf017b4dbb36afe565770a32046d6b |
|
MD5 | c6ef9d41603761646726464fc0449519 |
|
BLAKE2b-256 | e81ad7a1a71d0285c4a6175c045f248cb60731e8b8a74390550ad503c4535390 |