AuthenticatorManager
in package
implements
AuthenticatorManagerInterface, UserAuthenticatorInterface
Tags
Table of Contents
Interfaces
Properties
- $authenticators : iterable<string|int, mixed>
- $eraseCredentials : bool
- $eventDispatcher : mixed
- $firewallName : string
- $hideUserNotFoundExceptions : bool
- $logger : mixed
- $requiredBadges : array<string|int, mixed>
- $tokenStorage : mixed
Methods
- __construct() : mixed
- authenticateRequest() : Response|null
- Tries to authenticate the request and returns a response - if any authenticator set one.
- authenticateUser() : Response|null
- Convenience method to programmatically login a user and return a Response *if any* for success.
- supports() : bool|null
- Called to see if authentication should be attempted on this request.
- executeAuthenticator() : Response|null
- executeAuthenticators() : Response|null
- handleAuthenticationFailure() : Response|null
- Handles an authentication failure and returns the Response for the authenticator.
- handleAuthenticationSuccess() : Response|null
Properties
$authenticators
private
iterable<string|int, mixed>
$authenticators
$eraseCredentials
private
bool
$eraseCredentials
$eventDispatcher
private
mixed
$eventDispatcher
$firewallName
private
string
$firewallName
$hideUserNotFoundExceptions
private
bool
$hideUserNotFoundExceptions
$logger
private
mixed
$logger
$requiredBadges
private
array<string|int, mixed>
$requiredBadges
$tokenStorage
private
mixed
$tokenStorage
Methods
__construct()
public
__construct(iterable<mixed, AuthenticatorInterface> $authenticators, TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher, string $firewallName[, LoggerInterface $logger = null ][, bool $eraseCredentials = true ][, bool $hideUserNotFoundExceptions = true ][, array<string|int, mixed> $requiredBadges = [] ]) : mixed
Parameters
- $authenticators : iterable<mixed, AuthenticatorInterface>
- $tokenStorage : TokenStorageInterface
- $eventDispatcher : EventDispatcherInterface
- $firewallName : string
- $logger : LoggerInterface = null
- $eraseCredentials : bool = true
- $hideUserNotFoundExceptions : bool = true
- $requiredBadges : array<string|int, mixed> = []
authenticateRequest()
Tries to authenticate the request and returns a response - if any authenticator set one.
public
authenticateRequest(Request $request) : Response|null
Parameters
- $request : Request
Return values
Response|nullauthenticateUser()
Convenience method to programmatically login a user and return a Response *if any* for success.
public
authenticateUser(UserInterface $user, AuthenticatorInterface $authenticator, Request $request[, array<string|int, BadgeInterface> $badges = [] ]) : Response|null
Parameters
- $user : UserInterface
- $authenticator : AuthenticatorInterface
- $request : Request
- $badges : array<string|int, BadgeInterface> = []
-
Optionally, pass some Passport badges to use for the manual login
Return values
Response|nullsupports()
Called to see if authentication should be attempted on this request.
public
supports(Request $request) : bool|null
Parameters
- $request : Request
Return values
bool|nullexecuteAuthenticator()
private
executeAuthenticator(AuthenticatorInterface $authenticator, Request $request) : Response|null
Parameters
- $authenticator : AuthenticatorInterface
- $request : Request
Return values
Response|nullexecuteAuthenticators()
private
executeAuthenticators(array<string|int, AuthenticatorInterface> $authenticators, Request $request) : Response|null
Parameters
- $authenticators : array<string|int, AuthenticatorInterface>
- $request : Request
Return values
Response|nullhandleAuthenticationFailure()
Handles an authentication failure and returns the Response for the authenticator.
private
handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, AuthenticatorInterface $authenticator, Passport|null $passport) : Response|null
Parameters
- $authenticationException : AuthenticationException
- $request : Request
- $authenticator : AuthenticatorInterface
- $passport : Passport|null
Return values
Response|nullhandleAuthenticationSuccess()
private
handleAuthenticationSuccess(TokenInterface $authenticatedToken, Passport $passport, Request $request, AuthenticatorInterface $authenticator) : Response|null
Parameters
- $authenticatedToken : TokenInterface
- $passport : Passport
- $request : Request
- $authenticator : AuthenticatorInterface