AuthenticationFailureHandlerInterface.php 993 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Symfony\Component\Security\Http\Authentication;
  3. use Symfony\Component\Security\Core\Exception\AuthenticationException;
  4. use Symfony\Component\HttpFoundation\Request;
  5. /**
  6. * Interface for custom authentication failure handlers.
  7. *
  8. * If you want to customize the failure handling process, instead of
  9. * overwriting the respective listener globally, you can set a custom failure
  10. * handler which implements this interface.
  11. *
  12. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  13. */
  14. interface AuthenticationFailureHandlerInterface
  15. {
  16. /**
  17. * This is called when an interactive authentication attempt fails. This is
  18. * called by authentication listeners inheriting from
  19. * AbstractAuthenticationListener.
  20. *
  21. * @param Request $request
  22. * @param AuthenticationException $exception
  23. *
  24. * @return Response the response to return
  25. */
  26. function onAuthenticationFailure(Request $request, AuthenticationException $exception);
  27. }