REASON_BADLOGIN
REASON_BADLOGIN
Authentication failure reason: Bad username and/or password
The Horde_Auth class provides some useful authentication-related utilities and constants for the Auth package.
factory(string $driver, array $params = null) : \Horde_Auth_Base
Attempts to return a concrete Horde_Auth_Base instance based on $driver.
string | $driver | Either a driver name, or the full class name to use (class must extend Horde_Auth_Base). |
array | $params | A hash containing any additional configuration or parameters a subclass might need. |
The newly created concrete instance.
getCryptedPassword(string $plaintext, string $salt = '', string $encryption = 'md5-hex', boolean $show_encrypt = false) : string
Formats a password using the current encryption.
string | $plaintext | The plaintext password to encrypt. |
string | $salt | The salt to use to encrypt the password. If not present, a new salt will be generated. |
string | $encryption | The kind of pasword encryption to use. Defaults to md5-hex. |
boolean | $show_encrypt | Some password systems prepend the kind of encryption to the crypted password ({SHA}, etc). Defaults to false. |
The encrypted password.
None found |
getSalt(string $encryption = 'md5-hex', string $seed = '', string $plaintext = '') : string
Returns a salt for the appropriate kind of password encryption.
Optionally takes a seed and a plaintext password, to extract the seed of an existing password, or for encryption types that use the plaintext in the generation of the salt.
string | $encryption | The kind of pasword encryption to use. Defaults to md5-hex. |
string | $seed | The seed to get the salt from (probably a previously generated password). Defaults to generating a new seed. |
string | $plaintext | The plaintext password that we're generating a salt for. Defaults to none. |
The generated or extracted salt.
None found |
genRandomPassword() : string
Generates a random, hopefully pronounceable, password.
This can be used when resetting automatically a user's password.
A random password
None found |
checkPasswordPolicy(string $password, array $policy)
Checks whether a password matches some expected policy.
string | $password | A password. |
array | $policy | A configuration with policy rules. Supported rules:
|
if the password does not match the policy.
None found |
checkPasswordSimilarity(string $password, array $dict, float $max = 80)
Checks whether a password is too similar to a dictionary of strings.
string | $password | A password. |
array | $dict | A dictionary to check for similarity, for example the user name or an old password. |
float | $max | The maximum allowed similarity in percent. |
if the password is too similar.
None found |