1
- NotPwned
2
- ========
1
+ NotCompromisedPassword
2
+ ======================
3
3
4
4
.. versionadded :: 4.3
5
5
6
- The ``NotPwned `` constraint was introduced in Symfony 4.3.
6
+ The ``NotCompromisedPassword `` constraint was introduced in Symfony 4.3.
7
7
8
8
Validates that the given password has not been compromised by checking that is
9
9
not included in any of the public data breaches tracked by `haveibeenpwned.com `_.
@@ -15,8 +15,8 @@ Options - `groups`_
15
15
- `payload `_
16
16
- `skipOnError `_
17
17
- `threshold `_
18
- Class :class: `Symfony\\ Component\\ Validator\\ Constraints\\ NotPwned `
19
- Validator :class: `Symfony\\ Component\\ Validator\\ Constraints\\ NotPwnedValidator `
18
+ Class :class: `Symfony\\ Component\\ Validator\\ Constraints\\ NotCompromisedPassword `
19
+ Validator :class: `Symfony\\ Component\\ Validator\\ Constraints\\ NotCompromisedPasswordValidator `
20
20
========== ===================================================================
21
21
22
22
Basic Usage
@@ -39,7 +39,7 @@ The following constraint ensures that the ``rawPassword`` property of the
39
39
// ...
40
40
41
41
/**
42
- * @Assert\NotPwned
42
+ * @Assert\NotCompromisedPassword
43
43
*/
44
44
protected $rawPassword;
45
45
}
@@ -50,7 +50,7 @@ The following constraint ensures that the ``rawPassword`` property of the
50
50
App\Entity\User :
51
51
properties :
52
52
rawPassword :
53
- - NotPwned
53
+ - NotCompromisedPassword
54
54
55
55
.. code-block :: xml
56
56
@@ -62,7 +62,7 @@ The following constraint ensures that the ``rawPassword`` property of the
62
62
63
63
<class name =" App\Entity\User" >
64
64
<property name =" rawPassword" >
65
- <constraint name =" NotPwned " ></constraint >
65
+ <constraint name =" NotCompromisedPassword " ></constraint >
66
66
</property >
67
67
</class >
68
68
</constraint-mapping >
@@ -79,7 +79,7 @@ The following constraint ensures that the ``rawPassword`` property of the
79
79
{
80
80
public static function loadValidatorMetadata(ClassMetadata $metadata)
81
81
{
82
- $metadata->addPropertyConstraint('rawPassword', new Assert\NotPwned ());
82
+ $metadata->addPropertyConstraint('rawPassword', new Assert\NotCompromisedPassword ());
83
83
}
84
84
}
85
85
0 commit comments