UserAuthenticator
in package
implements
UserAuthenticator
Class UserAuthenticator
Interfaces, Classes and Traits
- UserAuthenticator
- Interface UserAuthenticatorInterface
Table of Contents
- $hashStrategies : array<string|int, HashStrategy>
- $userRepository : UserRepository
- __construct() : mixed
- WebAuthenticator constructor.
- authenticate() : UserId
- Authenticates a user based on the provided email and password and returns his ID.
Properties
$hashStrategies
private
array<string|int, HashStrategy>
$hashStrategies
$userRepository
private
UserRepository
$userRepository
Methods
__construct()
WebAuthenticator constructor.
public
__construct(UserRepository $userRepository, HashStrategy ...$hashStrategies) : mixed
Parameters
- $userRepository : UserRepository
- $hashStrategies : HashStrategy
Return values
mixed —authenticate()
Authenticates a user based on the provided email and password and returns his ID.
public
authenticate(string $email, string $password) : UserId
Parameters
- $email : string
- $password : string