Skip to main content

A Pwned Passwords implementation for Django sites.

Project description

CI status image

pwned-passwords-django provides helpers for working with the Pwned Passwords database from Have I Been Pwned in Django powered sites. Pwned Passwords is an extremely large database of passwords known to have been compromised through data breaches, and is useful as a tool for rejecting common or weak passwords.

There are three main components to this application:

All three use a secure, anonymized API which never transmits any password or its full hash to any third party.

Usage

The recommended configuration is to enable both the validator and the automatic password-checking middleware. To do this, make the following changes to your Django settings.

First, add the validator to your AUTH_PASSWORD_VALIDATORS list:

AUTH_PASSWORD_VALIDATORS = [
    # ... other password validators ...
    {
        "NAME": "pwned_passwords_django.validators.PwnedPasswordsValidator",
    },
]

Then, add the middleware to your MIDDLEWARE list:

MIDDLEWARE = [
    # .. other middlewares ...
    "pwned_passwords_django.middleware.pwned_passwords_middleware",
]

For more details, consult the full documentation.

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

pwned_passwords_django-5.1.3.tar.gz (43.0 kB view details)

Uploaded Source

Built Distribution

pwned_passwords_django-5.1.3-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file pwned_passwords_django-5.1.3.tar.gz.

File metadata

File hashes

Hashes for pwned_passwords_django-5.1.3.tar.gz
Algorithm Hash digest
SHA256 6fce80b12432efb47559f8436b24cea2271fe39823074ed46768522ef071bfcb
MD5 597333324dee2df5c17ff4388e6ef34e
BLAKE2b-256 363eeb463c3d5e05c9ee1b94f6126df19ac1249c44cdfddbb29b0ddbac0e4c7e

See more details on using hashes here.

File details

Details for the file pwned_passwords_django-5.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pwned_passwords_django-5.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7e1e6ad3d24d2d3742bf943b86127d5fc7c49fad7cb0c07a4f1af5c976d6db1c
MD5 a0993da3ce961fa0e76c94b1395a061e
BLAKE2b-256 3940956ad1d994223f61b1f479194bdb4ddba7c827f35efaef640d8334d9fa80

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page