PasswordPolicy
trait PasswordPolicy
This trait contains a collection of getter functions for retrieving values regarding your password policy.
Values come from config/password.php. Applications without that file fall back to the PW_* variables in .env. Env::load() converts "true" to a boolean and numbers to integers, so values are normalized here rather than compared to strings.
Methods
Gets max length rule for password.
Gets minimum rule for password.
Gets lower case character rule for password.
Gets max length for password.
Gets minimum length for password.
Gets numeric character rule for password.
Gets special character rule for password.
Gets upper case character rule for password.
Reads a boolean password setting.
Reads a numeric password setting.
Details
at line 22
bool
isMaxLength()
Gets max length rule for password.
at line 31
bool
isMinLength()
Gets minimum rule for password.
at line 40
bool
lowerChar()
Gets lower case character rule for password.
at line 49
int
maxLength()
Gets max length for password.
at line 58
int
minLength()
Gets minimum length for password.
at line 67
bool
numericChar()
Gets numeric character rule for password.
at line 76
bool
specialChar()
Gets special character rule for password.
at line 85
bool
upperChar()
Gets upper case character rule for password.
at line 96
static private bool
policyFlag(string $configKey, string $envKey)
Reads a boolean password setting.
at line 109
static private int
policyLength(string $configKey, string $envKey, int $default)
Reads a numeric password setting.