django-zxcvbn-password-validator


Namedjango-zxcvbn-password-validator JSON
Version 1.4.5 PyPI version JSON
download
home_pageNone
SummaryA translatable password validator for django, based on zxcvbn-python.
upload_time2024-05-30 14:51:00
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8.0
licenseMIT
keywords django password-validator zxcvbn
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-zxcvbn-password-validator

A translatable password validator for django, based on zxcvbn-python and available with
pip.

Professional support for django-zxcvbn-password-validator is available as part of the
[Tidelift Subscription](https://tidelift.com/subscription/pkg/pypi-django-zxcvbn-password-validator?utm_source=pypi-django-zxcvbn-password-validator&utm_medium=referral&utm_campaign=enterprise)

[![Build Status](https://travis-ci.org/Pierre-Sassoulas/django-zxcvbn-password-validator.svg?branch=master)](https://travis-ci.org/Pierre-Sassoulas/django-zxcvbn-password-validator)
[![Coverage Status](https://coveralls.io/repos/github/Pierre-Sassoulas/django-zxcvbn-password-validator/badge.svg?branch=master)](https://coveralls.io/github/Pierre-Sassoulas/django-zxcvbn-password-validator?branch=master)
[![PyPI version](https://badge.fury.io/py/django-zxcvbn-password-validator.svg)](https://badge.fury.io/py/django-zxcvbn-password-validator)

## Translating the project

This project is available in multiple language. Your contribution would be very
appreciated if you know a language that is not yet available. See
[how to contribute](CONTRIBUTING.md)

### Language available

The software is developed in english. Other available languages are :

- [x] Dutch thanks to [Thom Wiggers](https://github.com/thomwiggers/)
- [x] French thanks to [Pierre Sassoulas](https://github.com/Pierre-Sassoulas/) and
      [Lionel Sausin](https://github.com/ls-initiatives)
- [x] Brazilian Portuguese thanks to [Andrés Martano](https://github.com/andresmrm/)
- [x] English

## Creating a user with django-zxcvbn-password-validator

If the password is not strong enough, we provide errors explaining what you need to do :

![English example](doc/english_example.png "English example")

The error message are translated to your target language (even the string given by
zxcvbn that are in english only) :

![Translated example](doc/french_example.png "Translated example")

## How to use

Add `django-zxcvbn-password-validator` to your requirements and get it with pip. Then
everything happens in your settings file.

Add `'django_zxcvbn_password_validator'` in the `INSTALLED_APPS` :

```python
INSTALLED_APPS = [
    # ...
    "django_zxcvbn_password_validator"
]
```

Modify `AUTH_PASSWORD_VALIDATORS` :

```python
AUTH_PASSWORD_VALIDATORS = [
    {
        "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
    },
    {
        "NAME": "django_zxcvbn_password_validator.ZxcvbnPasswordValidator",
    },
    # ...
]
```

You could choose to use zxcvbn alone, but I personally still use Django's
`UserAttributeSimilarityValidator`, because there seems to be still be some problem with
it integrating user information with zxcvbn (as of june 2018).

Finally, you can set the `PASSWORD_MINIMAL_STRENGTH` to your liking (default is 2),
every password scoring lower than this number will be rejected :

```python
# 0 too guessable: risky password. (guesses < 10^3)
# 1 very guessable: protection from throttled online attacks.
# (guesses < 10^6)
# 2 somewhat guessable: protection from unthrottled online attacks.
# (guesses < 10^8)
# 3 safely unguessable: moderate protection from offline slow-hash scenario.
# (guesses < 10^10)
# 4 very unguessable: strong protection from offline slow-hash scenario.
# (guesses >= 10^10)
PASSWORD_MINIMAL_STRENGTH = 0 if DEBUG else 4
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-zxcvbn-password-validator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8.0",
    "maintainer_email": null,
    "keywords": "django, password-validator, zxcvbn",
    "author": null,
    "author_email": "Pierre SASSOULAS <pierre.sassoulas@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e6/84/501070029bf091c57063d51745012b151f5ece486cd5c9ffa41914b0bc26/django_zxcvbn_password_validator-1.4.5.tar.gz",
    "platform": null,
    "description": "# django-zxcvbn-password-validator\n\nA translatable password validator for django, based on zxcvbn-python and available with\npip.\n\nProfessional support for django-zxcvbn-password-validator is available as part of the\n[Tidelift Subscription](https://tidelift.com/subscription/pkg/pypi-django-zxcvbn-password-validator?utm_source=pypi-django-zxcvbn-password-validator&utm_medium=referral&utm_campaign=enterprise)\n\n[![Build Status](https://travis-ci.org/Pierre-Sassoulas/django-zxcvbn-password-validator.svg?branch=master)](https://travis-ci.org/Pierre-Sassoulas/django-zxcvbn-password-validator)\n[![Coverage Status](https://coveralls.io/repos/github/Pierre-Sassoulas/django-zxcvbn-password-validator/badge.svg?branch=master)](https://coveralls.io/github/Pierre-Sassoulas/django-zxcvbn-password-validator?branch=master)\n[![PyPI version](https://badge.fury.io/py/django-zxcvbn-password-validator.svg)](https://badge.fury.io/py/django-zxcvbn-password-validator)\n\n## Translating the project\n\nThis project is available in multiple language. Your contribution would be very\nappreciated if you know a language that is not yet available. See\n[how to contribute](CONTRIBUTING.md)\n\n### Language available\n\nThe software is developed in english. Other available languages are :\n\n- [x] Dutch thanks to [Thom Wiggers](https://github.com/thomwiggers/)\n- [x] French thanks to [Pierre Sassoulas](https://github.com/Pierre-Sassoulas/) and\n      [Lionel Sausin](https://github.com/ls-initiatives)\n- [x] Brazilian Portuguese thanks to [Andr\u00e9s Martano](https://github.com/andresmrm/)\n- [x] English\n\n## Creating a user with django-zxcvbn-password-validator\n\nIf the password is not strong enough, we provide errors explaining what you need to do :\n\n![English example](doc/english_example.png \"English example\")\n\nThe error message are translated to your target language (even the string given by\nzxcvbn that are in english only) :\n\n![Translated example](doc/french_example.png \"Translated example\")\n\n## How to use\n\nAdd `django-zxcvbn-password-validator` to your requirements and get it with pip. Then\neverything happens in your settings file.\n\nAdd `'django_zxcvbn_password_validator'` in the `INSTALLED_APPS` :\n\n```python\nINSTALLED_APPS = [\n    # ...\n    \"django_zxcvbn_password_validator\"\n]\n```\n\nModify `AUTH_PASSWORD_VALIDATORS` :\n\n```python\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        \"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\",\n    },\n    {\n        \"NAME\": \"django_zxcvbn_password_validator.ZxcvbnPasswordValidator\",\n    },\n    # ...\n]\n```\n\nYou could choose to use zxcvbn alone, but I personally still use Django's\n`UserAttributeSimilarityValidator`, because there seems to be still be some problem with\nit integrating user information with zxcvbn (as of june 2018).\n\nFinally, you can set the `PASSWORD_MINIMAL_STRENGTH` to your liking (default is 2),\nevery password scoring lower than this number will be rejected :\n\n```python\n# 0 too guessable: risky password. (guesses < 10^3)\n# 1 very guessable: protection from throttled online attacks.\n# (guesses < 10^6)\n# 2 somewhat guessable: protection from unthrottled online attacks.\n# (guesses < 10^8)\n# 3 safely unguessable: moderate protection from offline slow-hash scenario.\n# (guesses < 10^10)\n# 4 very unguessable: strong protection from offline slow-hash scenario.\n# (guesses >= 10^10)\nPASSWORD_MINIMAL_STRENGTH = 0 if DEBUG else 4\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A translatable password validator for django, based on zxcvbn-python.",
    "version": "1.4.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/Pierre-Sassoulas/django-zxcvbn-password-validator/issues",
        "Source Code": "https://github.com/Pierre-Sassoulas/django-zxcvbn-password-validator"
    },
    "split_keywords": [
        "django",
        " password-validator",
        " zxcvbn"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "11cff5bd73b14d21bd759515cf5384f072c161ae63235a08ae02a9d65d0640e3",
                "md5": "0cca50a29ef2ef22511a3c536c6f03dc",
                "sha256": "1879f8803e5adbed5462093ccd89a583d2da2af264fbc1347a28785545219327"
            },
            "downloads": -1,
            "filename": "django_zxcvbn_password_validator-1.4.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0cca50a29ef2ef22511a3c536c6f03dc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.0",
            "size": 25877,
            "upload_time": "2024-05-30T14:50:58",
            "upload_time_iso_8601": "2024-05-30T14:50:58.526668Z",
            "url": "https://files.pythonhosted.org/packages/11/cf/f5bd73b14d21bd759515cf5384f072c161ae63235a08ae02a9d65d0640e3/django_zxcvbn_password_validator-1.4.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e684501070029bf091c57063d51745012b151f5ece486cd5c9ffa41914b0bc26",
                "md5": "32eb97f557a15eaf23af17bec664a28b",
                "sha256": "7cc697f2c2d873e8681374f6b777f06534e70d7c612929f1604427011d8745a4"
            },
            "downloads": -1,
            "filename": "django_zxcvbn_password_validator-1.4.5.tar.gz",
            "has_sig": false,
            "md5_digest": "32eb97f557a15eaf23af17bec664a28b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.0",
            "size": 17351,
            "upload_time": "2024-05-30T14:51:00",
            "upload_time_iso_8601": "2024-05-30T14:51:00.160776Z",
            "url": "https://files.pythonhosted.org/packages/e6/84/501070029bf091c57063d51745012b151f5ece486cd5c9ffa41914b0bc26/django_zxcvbn_password_validator-1.4.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-30 14:51:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Pierre-Sassoulas",
    "github_project": "django-zxcvbn-password-validator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "django-zxcvbn-password-validator"
}
        
Elapsed time: 0.39211s