mediatekformation

GuardAuthenticatorHandler
in package

A utility class that does much of the *work* during the guard authentication process.

By having the logic here instead of the listener, more of the process can be called directly (e.g. for manual authentication) or overridden.

Tags
author

Ryan Weaver ryan@knpuniversity.com

final

Table of Contents

$dispatcher  : mixed
$sessionStrategy  : mixed
$statelessProviderKeys  : mixed
$tokenStorage  : mixed
__construct()  : mixed
authenticateUserAndHandleSuccess()  : Response|null
Convenience method for authenticating the user and returning the Response *if any* for success.
authenticateWithToken()  : mixed
Authenticates the given token in the system.
handleAuthenticationFailure()  : Response|null
Handles an authentication failure and returns the Response for the GuardAuthenticator.
handleAuthenticationSuccess()  : Response|null
Returns the "on success" response for the given GuardAuthenticator.
setSessionAuthenticationStrategy()  : mixed
Call this method if your authentication token is stored to a session.
migrateSession()  : mixed

Properties

Methods

__construct()

public __construct(TokenStorageInterface $tokenStorage[, EventDispatcherInterface $eventDispatcher = null ][, array<string|int, mixed> $statelessProviderKeys = [] ]) : mixed
Parameters
$tokenStorage : TokenStorageInterface
$eventDispatcher : EventDispatcherInterface = null
$statelessProviderKeys : array<string|int, mixed> = []

An array of provider/firewall keys that are "stateless" and so do not need the session migrated on success

Return values
mixed

authenticateWithToken()

Authenticates the given token in the system.

public authenticateWithToken(TokenInterface $token, Request $request[, string $providerKey = null ]) : mixed
Parameters
$token : TokenInterface
$request : Request
$providerKey : string = null
Return values
mixed

handleAuthenticationFailure()

Handles an authentication failure and returns the Response for the GuardAuthenticator.

public handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, AuthenticatorInterface $guardAuthenticator, string $providerKey) : Response|null
Parameters
$authenticationException : AuthenticationException
$request : Request
$guardAuthenticator : AuthenticatorInterface
$providerKey : string
Return values
Response|null

Search results