darookee / pwnwedpassword-validator
PwnedPassword Validator Constraint for Symfony
1.0.1
2018-11-23 16:19 UTC
Requires
- ext-curl: *
This package is auto-updated.
Last update: 2025-02-07 23:17:00 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;
}