Skip to content
This repository was archived by the owner on Jan 27, 2019. It is now read-only.

Latest commit

 

History

History
47 lines (35 loc) · 876 Bytes

README.md

File metadata and controls

47 lines (35 loc) · 876 Bytes

django-hibpwned

Django (>=1.9) password validator based on haveibeenpwned.com API

Requirements

Python 3.5+
Django 1.9+
requests 2+

Installation

pip install django-hibpwned

Usage

Add to settings.py:

AUTH_PASSWORD_VALIDATORS = [
    (...)
    {
        'NAME': 'haveibeenpwned.validators.HaveIBeenPwnedValidator'
    },
]

reference

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

Credits:

  1. Troy Hunt
  2. HaveIBeenPwned.com
  3. Django
  4. Requests