darookee/pwnwedpassword-validator

PwnedPassword Validator Constraint for Symfony

1.0.1 2018-11-23 16:19 UTC

This package is auto-updated.

Last update: 2024-05-07 21:47:59 UTC


README

This Validator uses curl to query the https://haveibeenpwned.com API for the first 5 chars of the SHA1 of a value, that is to be validated. If it finds the exact SHA1 hash in the response it will add a validation error.

Usage

use R\Validator\Constraints as RAssert;

class MyEntity {

    /**
    * @RAssert\PwnedPasswords()
    **/
    var $password;
}