Documentation

AuthenticatorManager
in package
implements AuthenticatorManagerInterface, UserAuthenticatorInterface

Tags
author

Wouter de Jong wouter@wouterj.nl

author

Ryan Weaver ryan@symfonycasts.com

author

Amaury Leroux de Lens amaury@lerouxdelens.com

Table of Contents

Interfaces

AuthenticatorManagerInterface
UserAuthenticatorInterface

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

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> = []

authenticateUser()

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|null

supports()

Called to see if authentication should be attempted on this request.

public supports(Request $request) : bool|null
Parameters
$request : Request
Return values
bool|null

handleAuthenticationFailure()

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|null

        
On this page

Search results