UserPasswordHasherInterface
in
Interface for the user password hasher service.
Tags
Table of Contents
Methods
- hashPassword() : string
- Hashes the plain password for the given user.
- isPasswordValid() : bool
- Checks if the plaintext password matches the user's password.
- needsRehash() : bool
- Checks if an encoded password would benefit from rehashing.
Methods
hashPassword()
Hashes the plain password for the given user.
public
hashPassword(PasswordAuthenticatedUserInterface $user, string $plainPassword) : string
Parameters
- $user : PasswordAuthenticatedUserInterface
- $plainPassword : string
Return values
stringisPasswordValid()
Checks if the plaintext password matches the user's password.
public
isPasswordValid(PasswordAuthenticatedUserInterface $user, string $plainPassword) : bool
Parameters
- $user : PasswordAuthenticatedUserInterface
- $plainPassword : string
Return values
boolneedsRehash()
Checks if an encoded password would benefit from rehashing.
public
needsRehash(PasswordAuthenticatedUserInterface $user) : bool