DaoAuthenticationProvider
extends UserAuthenticationProvider
in package
DaoAuthenticationProvider uses a UserProviderInterface to retrieve the user for a UsernamePasswordToken.
Tags
Table of Contents
- $encoderFactory : mixed
- $hideUserNotFoundExceptions : mixed
- $providerKey : mixed
- $userChecker : mixed
- $userProvider : mixed
- __construct() : mixed
- authenticate() : mixed
- {@inheritdoc}
- supports() : bool
- Checks whether this provider supports the given token.
- checkAuthentication() : mixed
- Does additional checks on the user and token (like validating the credentials).
- retrieveUser() : UserInterface
- Retrieves the user from an implementation-specific location.
- getRoles() : array<string|int, mixed>
- Retrieves roles from user and appends SwitchUserRole if original token contained one.
Properties
$encoderFactory
private
mixed
$encoderFactory
$hideUserNotFoundExceptions
private
mixed
$hideUserNotFoundExceptions
$providerKey
private
mixed
$providerKey
$userChecker
private
mixed
$userChecker
$userProvider
private
mixed
$userProvider
Methods
__construct()
public
__construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, string $providerKey, EncoderFactoryInterface $encoderFactory[, bool $hideUserNotFoundExceptions = true ]) : mixed
Parameters
- $userProvider : UserProviderInterface
- $userChecker : UserCheckerInterface
- $providerKey : string
- $encoderFactory : EncoderFactoryInterface
- $hideUserNotFoundExceptions : bool = true
Return values
mixed —authenticate()
{@inheritdoc}
public
authenticate(TokenInterface $token) : mixed
Parameters
- $token : TokenInterface
Return values
mixed —supports()
Checks whether this provider supports the given token.
public
supports(TokenInterface $token) : bool
Parameters
- $token : TokenInterface
Return values
bool —true if the implementation supports the Token, false otherwise
checkAuthentication()
Does additional checks on the user and token (like validating the credentials).
protected
checkAuthentication(UserInterface $user, UsernamePasswordToken $token) : mixed
Parameters
- $user : UserInterface
- $token : UsernamePasswordToken
Return values
mixed —retrieveUser()
Retrieves the user from an implementation-specific location.
protected
retrieveUser(mixed $username, UsernamePasswordToken $token) : UserInterface
Parameters
- $username : mixed
-
The username to retrieve
- $token : UsernamePasswordToken
Return values
UserInterface —The user
getRoles()
Retrieves roles from user and appends SwitchUserRole if original token contained one.
private
getRoles(UserInterface $user, TokenInterface $token) : array<string|int, mixed>
Parameters
- $user : UserInterface
- $token : TokenInterface