PasswordHasherFactory
in package
implements
PasswordHasherFactoryInterface
A generic hasher factory implementation.
Tags
Table of Contents
Interfaces
- PasswordHasherFactoryInterface
- PasswordHasherFactoryInterface to support different password hashers for different user accounts.
Properties
- $passwordHashers : array<string|int, mixed>
Methods
- __construct() : mixed
- getPasswordHasher() : PasswordHasherInterface
- Returns the password hasher to use for the given user.
- createHasher() : PasswordHasherInterface
- Creates the actual hasher instance.
- getHasherConfigFromAlgorithm() : array<string|int, mixed>
Properties
$passwordHashers
private
array<string|int, mixed>
$passwordHashers
Methods
__construct()
public
__construct(array<string, PasswordHasherInterface|array<string|int, mixed>> $passwordHashers) : mixed
Parameters
- $passwordHashers : array<string, PasswordHasherInterface|array<string|int, mixed>>
getPasswordHasher()
Returns the password hasher to use for the given user.
public
getPasswordHasher(string|PasswordAuthenticatedUserInterface|PasswordHasherAwareInterface $user) : PasswordHasherInterface
Parameters
- $user : string|PasswordAuthenticatedUserInterface|PasswordHasherAwareInterface
Return values
PasswordHasherInterfacecreateHasher()
Creates the actual hasher instance.
private
createHasher(array<string|int, mixed> $config[, bool $isExtra = false ]) : PasswordHasherInterface
Parameters
- $config : array<string|int, mixed>
- $isExtra : bool = false
Tags
Return values
PasswordHasherInterfacegetHasherConfigFromAlgorithm()
private
getHasherConfigFromAlgorithm(array<string|int, mixed> $config) : array<string|int, mixed>
Parameters
- $config : array<string|int, mixed>