Socket
Socket
Sign inDemoInstall

django-advanced-password-validation

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    django-advanced-password-validation

Extends Django password validation options in an attempt to keep up with industry standards for strong user passwords.


Maintainers
1

Readme

django_advanced_password_validation

test Coverage Status

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 has been tested with python 3.9+.

Prerequisites

Requires Django 3.2 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=3.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 optional validators must be configured in the settings.py file of your django project to be actively used in your project.

/my-cool-project/settings.py
INSTALLED_APPS = [
    ...
    'django_advanced_password_validation',
    ...
]

AUTH_PASSWORD_VALIDATORS = [
    ...
    {
        'NAME': 'django_advanced_password_validation.advanced_password_validation.ContainsDigitsValidator',
        'OPTIONS': {
            'min_digits': 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.

ValidatorOptionDefault
ContainsDigitsValidatormin_digits1
ContainsUppercaseValidatormin_uppercase1
ContainsLowercaseValidatormin_lowercase1
ContainsSpecialCharactersValidatormin_characters1
MaximumLengthValidatormax_length128
MaxConsecutiveCharactersValidatormax_consecutive3
ConsecutivelyIncreasingDigitValidatormax_consecutive3
ConsecutivelyDecreasingDigitValidatormax_consecutive3

Authors

  • Ezra Rice - Initial work - ezrajrice

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • Victor Semionov - Contributor - vsemionov
  • Mostafa Moradian - Contributor - mostafa

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc