SimpleAuthenticationHandler
in package
implements
AuthenticationFailureHandlerInterface, AuthenticationSuccessHandlerInterface
Class to proxy authentication success/failure handlers.
Events are sent to the SimpleAuthenticatorInterface if it implements the right interface, otherwise (or if it fails to return a Response) the default handlers are triggered.
Tags
Interfaces, Classes, Traits and Enums
- AuthenticationFailureHandlerInterface
- Interface for custom authentication failure handlers.
- AuthenticationSuccessHandlerInterface
- Interface for a custom authentication success handler.
Table of Contents
- $failureHandler : mixed
- $logger : mixed
- $simpleAuthenticator : mixed
- $successHandler : mixed
- __construct() : mixed
- onAuthenticationFailure() : Response
- This is called when an interactive authentication attempt fails. This is called by authentication listeners inheriting from AbstractAuthenticationListener.
- onAuthenticationSuccess() : Response
- This is called when an interactive authentication attempt succeeds. This is called by authentication listeners inheriting from AbstractAuthenticationListener.
Properties
$failureHandler
protected
mixed
$failureHandler
$logger
protected
mixed
$logger
$simpleAuthenticator
protected
mixed
$simpleAuthenticator
$successHandler
protected
mixed
$successHandler
Methods
__construct()
public
__construct(SimpleAuthenticatorInterface $authenticator, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler[, LoggerInterface $logger = null ]) : mixed
Parameters
- $authenticator : SimpleAuthenticatorInterface
- $successHandler : AuthenticationSuccessHandlerInterface
- $failureHandler : AuthenticationFailureHandlerInterface
- $logger : LoggerInterface = null
Return values
mixed —onAuthenticationFailure()
This is called when an interactive authentication attempt fails. This is called by authentication listeners inheriting from AbstractAuthenticationListener.
public
onAuthenticationFailure(Request $request, AuthenticationException $exception) : Response
Parameters
- $request : Request
- $exception : AuthenticationException
Return values
Response —The response to return, never null
onAuthenticationSuccess()
This is called when an interactive authentication attempt succeeds. This is called by authentication listeners inheriting from AbstractAuthenticationListener.
public
onAuthenticationSuccess(Request $request, TokenInterface $token) : Response
Parameters
- $request : Request
- $token : TokenInterface