Trait PasswordHasherTrait
Namespace: Authentication\PasswordHasher
Property Summary
-
$_needsPasswordRehash protected
bool
Whether or not the user authenticated by this class requires their password to be rehashed with another algorithm.
-
$_passwordHasher protected
Authentication\PasswordHasher\PasswordHasherInterface
Password hasher instance.
Method Summary
-
getPasswordHasher() public
Return password hasher object. If a password hasher has not been set, DefaultPasswordHasher instance is returned.
-
needsPasswordRehash() public
Returns whether or not the password stored in the repository for the logged in user requires to be rehashed with another algorithm
-
setPasswordHasher() public
Sets password hasher object.
Method Detail
getPasswordHasher() ¶ public
getPasswordHasher(): Authentication\PasswordHasher\PasswordHasherInterface
Return password hasher object. If a password hasher has not been set, DefaultPasswordHasher instance is returned.
Returns
Authentication\PasswordHasher\PasswordHasherInterface
needsPasswordRehash() ¶ public
needsPasswordRehash(): bool
Returns whether or not the password stored in the repository for the logged in user requires to be rehashed with another algorithm
Returns
bool
setPasswordHasher() ¶ public
setPasswordHasher(Authentication\PasswordHasher\PasswordHasherInterface $passwordHasher): $this
Sets password hasher object.
Parameters
-
Authentication\PasswordHasher\PasswordHasherInterface
$passwordHasher Password hasher instance.
Returns
$this