django-hibpwned
Django (>=1.9) password validator based on haveibeenpwned.com API
Requirements
Python 3.5+
Django 1.9+
requests 2+
Usage:
Add to settings.py:
AUTH_PASSWORD_VALIDATORS = [
(...)
{
'NAME': 'haveibeenpwned.validators.HaveIBeenPwnedValidator'
},
]
Tests
To run the test suite create and activate a virtual environment. Then install some requirements and run the tests:
$ cd tests
$ pip install -e ..
$ ./runtests.py