GuardAuthenticationProvider
in package
implements
AuthenticationProviderInterface
Responsible for accepting the PreAuthenticationGuardToken and calling the correct authenticator to retrieve the authenticated token.
Tags
Interfaces, Classes, Traits and Enums
- AuthenticationProviderInterface
- AuthenticationProviderInterface is the interface for all authentication providers.
Table of Contents
- $guardAuthenticators : array<string|int, AuthenticatorInterface>
- $passwordEncoder : mixed
- $providerKey : mixed
- $userChecker : mixed
- $userProvider : mixed
- __construct() : mixed
- authenticate() : TokenInterface
- Finds the correct authenticator for the token and calls it.
- supports() : bool
- Checks whether this provider supports the given token.
- authenticateViaGuard() : GuardTokenInterface
- findOriginatingAuthenticator() : AuthenticatorInterface|null
Properties
$guardAuthenticators
private
array<string|int, AuthenticatorInterface>
$guardAuthenticators
$passwordEncoder
private
mixed
$passwordEncoder
$providerKey
private
mixed
$providerKey
$userChecker
private
mixed
$userChecker
$userProvider
private
mixed
$userProvider
Methods
__construct()
public
__construct(iteratable<string|int, mixed>|array<string|int, AuthenticatorInterface> $guardAuthenticators, UserProviderInterface $userProvider, string $providerKey, UserCheckerInterface $userChecker[, UserPasswordEncoderInterface $passwordEncoder = null ]) : mixed
Parameters
- $guardAuthenticators : iteratable<string|int, mixed>|array<string|int, AuthenticatorInterface>
-
The authenticators, with keys that match what's passed to GuardAuthenticationListener
- $userProvider : UserProviderInterface
- $providerKey : string
-
The provider (i.e. firewall) key
- $userChecker : UserCheckerInterface
- $passwordEncoder : UserPasswordEncoderInterface = null
Return values
mixed —authenticate()
Finds the correct authenticator for the token and calls it.
public
authenticate(GuardTokenInterface $token) : TokenInterface
Parameters
- $token : GuardTokenInterface
Return values
TokenInterface —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
authenticateViaGuard()
private
authenticateViaGuard(AuthenticatorInterface $guardAuthenticator, PreAuthenticationGuardToken $token) : GuardTokenInterface
Parameters
- $guardAuthenticator : AuthenticatorInterface
- $token : PreAuthenticationGuardToken
Return values
GuardTokenInterface —findOriginatingAuthenticator()
private
findOriginatingAuthenticator(PreAuthenticationGuardToken $token) : AuthenticatorInterface|null
Parameters
- $token : PreAuthenticationGuardToken