django-password-validators


Namedjango-password-validators JSON
Version 1.7.3 PyPI version JSON
download
home_pagehttps://github.com/fizista/django-password-validators
SummaryAdditional libraries for validating passwords in Django.
upload_time2023-12-11 13:53:47
maintainer
docs_urlNone
authorWojciech Banas
requires_python
licenseBSD
keywords django password validator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==========================
Django Password Validators
==========================

.. image:: https://github.com/fizista/django-password-validators/actions/workflows/ci.yml/badge.svg?branch=master
    :target: https://github.com/fizista/django-password-validators/actions/workflows/ci.yml?query=branch%3Amaster
    :alt: CI status

Additional libraries for validating passwords in Django 3.2 or later.

The application works well under python 4.x and 3.x versions.

Django version after the number 1.9, allows you to configure password validation.
Configuration validation is placed under the variable AUTH_PASSWORD_VALIDATORS_.


Installation
============

Just install ``django-password-validators`` via ``pip``::

    $ pip install django-password-validators
    
    
Validators
==========

------------------------
UniquePasswordsValidator
------------------------
Validator checks if the password was once used by a particular user. 
If the password is used, then an exception is thrown, of course.

For each user, all the passwords are stored in a database.
All passwords are strongly encrypted.

Configuration...

In the file settings.py we add ::

    INSTALLED_APPS = [
        ...
        'django_password_validators',
        'django_password_validators.password_history',
        ...
    ]

   AUTH_PASSWORD_VALIDATORS = [
       ...
       {
           'NAME': 'django_password_validators.password_history.password_validation.UniquePasswordsValidator',
           'OPTIONS': {
                # How many recently entered passwords matter.
                # Passwords out of range are deleted.
                # Default: 0 - All passwords entered by the user. All password hashes are stored.
               'last_passwords': 5 # Only the last 5 passwords entered by the user
           }
       },
       ...
   ]

   # If you want, you can change the default hasher for the password history.
   # DPV_DEFAULT_HISTORY_HASHER = 'django_password_validators.password_history.hashers.HistoryHasher'

And run ::

    python manage.py migrate

--------------------------
PasswordCharacterValidator
--------------------------

The validator checks for the minimum number of characters of a given type.

In the file settings.py we add ::

    INSTALLED_APPS = [
        ...
        'django_password_validators',
        ...
    ]

   AUTH_PASSWORD_VALIDATORS = [
       ...
       {
           'NAME': 'django_password_validators.password_character_requirements.password_validation.PasswordCharacterValidator',
           'OPTIONS': {
                'min_length_digit': 1,
                'min_length_alpha': 2,
                'min_length_special': 3,
                'min_length_lower': 4,
                'min_length_upper': 5,
                'special_characters': "~!@#$%^&*()_+{}\":;'[]"
            }
       },
       ...
   ]


.. _AUTH_PASSWORD_VALIDATORS: https://docs.djangoproject.com/en/4.1/ref/settings/#std-setting-AUTH_PASSWORD_VALIDATORS

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fizista/django-password-validators",
    "name": "django-password-validators",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django password validator",
    "author": "Wojciech Banas",
    "author_email": "fizista@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/63/91/82e0404483a5e2c0f3fdc144db39874b59107ed6a4a00afecf0c9d204a74/django-password-validators-1.7.3.tar.gz",
    "platform": null,
    "description": "==========================\nDjango Password Validators\n==========================\n\n.. image:: https://github.com/fizista/django-password-validators/actions/workflows/ci.yml/badge.svg?branch=master\n    :target: https://github.com/fizista/django-password-validators/actions/workflows/ci.yml?query=branch%3Amaster\n    :alt: CI status\n\nAdditional libraries for validating passwords in Django 3.2 or later.\n\nThe application works well under python 4.x and 3.x versions.\n\nDjango version after the number 1.9, allows you to configure password validation.\nConfiguration validation is placed under the variable AUTH_PASSWORD_VALIDATORS_.\n\n\nInstallation\n============\n\nJust install ``django-password-validators`` via ``pip``::\n\n    $ pip install django-password-validators\n    \n    \nValidators\n==========\n\n------------------------\nUniquePasswordsValidator\n------------------------\nValidator checks if the password was once used by a particular user. \nIf the password is used, then an exception is thrown, of course.\n\nFor each user, all the passwords are stored in a database.\nAll passwords are strongly encrypted.\n\nConfiguration...\n\nIn the file settings.py we add ::\n\n    INSTALLED_APPS = [\n        ...\n        'django_password_validators',\n        'django_password_validators.password_history',\n        ...\n    ]\n\n   AUTH_PASSWORD_VALIDATORS = [\n       ...\n       {\n           'NAME': 'django_password_validators.password_history.password_validation.UniquePasswordsValidator',\n           'OPTIONS': {\n                # How many recently entered passwords matter.\n                # Passwords out of range are deleted.\n                # Default: 0 - All passwords entered by the user. All password hashes are stored.\n               'last_passwords': 5 # Only the last 5 passwords entered by the user\n           }\n       },\n       ...\n   ]\n\n   # If you want, you can change the default hasher for the password history.\n   # DPV_DEFAULT_HISTORY_HASHER = 'django_password_validators.password_history.hashers.HistoryHasher'\n\nAnd run ::\n\n    python manage.py migrate\n\n--------------------------\nPasswordCharacterValidator\n--------------------------\n\nThe validator checks for the minimum number of characters of a given type.\n\nIn the file settings.py we add ::\n\n    INSTALLED_APPS = [\n        ...\n        'django_password_validators',\n        ...\n    ]\n\n   AUTH_PASSWORD_VALIDATORS = [\n       ...\n       {\n           'NAME': 'django_password_validators.password_character_requirements.password_validation.PasswordCharacterValidator',\n           'OPTIONS': {\n                'min_length_digit': 1,\n                'min_length_alpha': 2,\n                'min_length_special': 3,\n                'min_length_lower': 4,\n                'min_length_upper': 5,\n                'special_characters': \"~!@#$%^&*()_+{}\\\":;'[]\"\n            }\n       },\n       ...\n   ]\n\n\n.. _AUTH_PASSWORD_VALIDATORS: https://docs.djangoproject.com/en/4.1/ref/settings/#std-setting-AUTH_PASSWORD_VALIDATORS\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Additional libraries for validating passwords in Django.",
    "version": "1.7.3",
    "project_urls": {
        "Homepage": "https://github.com/fizista/django-password-validators"
    },
    "split_keywords": [
        "django",
        "password",
        "validator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8f9c83f378a46535c4851df45bc9d172f262c5a7df75575b9087a8fe1ae2af7",
                "md5": "3a55846851b8c894cdc4ef4b600ed87c",
                "sha256": "f243a82957e9b17a0c7cf5580f9d7588471cb6530c2dce7ee4e1222dddfe5768"
            },
            "downloads": -1,
            "filename": "django_password_validators-1.7.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3a55846851b8c894cdc4ef4b600ed87c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 39013,
            "upload_time": "2023-12-11T13:53:44",
            "upload_time_iso_8601": "2023-12-11T13:53:44.023456Z",
            "url": "https://files.pythonhosted.org/packages/d8/f9/c83f378a46535c4851df45bc9d172f262c5a7df75575b9087a8fe1ae2af7/django_password_validators-1.7.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "639182e0404483a5e2c0f3fdc144db39874b59107ed6a4a00afecf0c9d204a74",
                "md5": "874ab9c4063b65e28cf767ba2e3a1642",
                "sha256": "7175aefa6e86dc002dd3539327bf2d752097651704927dc409a669259e0d2195"
            },
            "downloads": -1,
            "filename": "django-password-validators-1.7.3.tar.gz",
            "has_sig": false,
            "md5_digest": "874ab9c4063b65e28cf767ba2e3a1642",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19488,
            "upload_time": "2023-12-11T13:53:47",
            "upload_time_iso_8601": "2023-12-11T13:53:47.945353Z",
            "url": "https://files.pythonhosted.org/packages/63/91/82e0404483a5e2c0f3fdc144db39874b59107ed6a4a00afecf0c9d204a74/django-password-validators-1.7.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-11 13:53:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fizista",
    "github_project": "django-password-validators",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-password-validators"
}
        
Elapsed time: 0.15650s