Http\Authentication\SimpleAuthenticationHandler (Component\Security)
Symfony\Component\Security\Http\Authentication\SimpleAuthenticationHandler
class SimpleAuthenticationHandler 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.
Methods
__construct(SimpleAuthenticatorInterface $authenticator, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, LoggerInterface $logger = null) Constructor. | ||
Response | onAuthenticationSuccess(Request $request, TokenInterface $token) This is called when an interactive authentication attempt succeeds. | |
Response | onAuthenticationFailure(Request $request, AuthenticationException $exception) This is called when an interactive authentication attempt fails. |
Details
public __construct(SimpleAuthenticatorInterface $authenticator, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, LoggerInterface $logger = null)
Constructor.
public Response onAuthenticationSuccess(Request $request, TokenInterface $token)
This is called when an interactive authentication attempt succeeds.
This is called by authentication listeners inheriting from AbstractAuthenticationListener.
public Response onAuthenticationFailure(Request $request, AuthenticationException $exception)
This is called when an interactive authentication attempt fails.
This is called by authentication listeners inheriting from AbstractAuthenticationListener.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.html