PasswordStrength
Piwik\Auth\
PasswordStrength
Main class to handle actions related to password strength rules and verification of those rules.
Methods
The class defines the following methods:
__construct()getRules()— Provides the rules for defining a strong password.validatePasswordStrength()— Determines which rules a password candidate breaks with regards to password strength.formatValidationFailedMessage()getRulesAsHtmlList()
__construct()
Signature
- It accepts the following parameter(s):
$featureEnabled(bool) —
getRules()
Provides the rules for defining a strong password. Rules are broken up into a regular expression which is applied to a password candidate, and a string which describes what the rule is testing for.
Signature
- Returns:
array— of rules to test password candidates against.
validatePasswordStrength()
Determines which rules a password candidate breaks with regards to password strength.
Signature
It accepts the following parameter(s):
$candidate(string) — The password candidate to be tested.
Returns:
array— of rules which the password breaks.
formatValidationFailedMessage()
Signature
It accepts the following parameter(s):
$brokenRules(array) —
It returns a
stringvalue.
getRulesAsHtmlList()
Signature
- It returns a
stringvalue.