AuthenticationSuccessHandlerInterface.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Security\Http\Authentication;
  11. use Symfony\Component\HttpFoundation\Request;
  12. use Symfony\Component\HttpFoundation\Response;
  13. use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
  14. /**
  15. * Interface for a custom authentication success handler.
  16. *
  17. * If you want to customize the success handling process, instead of
  18. * overwriting the respective listener globally, you can set a custom success
  19. * handler which implements this interface.
  20. *
  21. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  22. */
  23. interface AuthenticationSuccessHandlerInterface
  24. {
  25. /**
  26. * This is called when an interactive authentication attempt succeeds. This
  27. * is called by authentication listeners inheriting from
  28. * AbstractAuthenticationListener.
  29. *
  30. * @return Response
  31. */
  32. public function onAuthenticationSuccess(Request $request, TokenInterface $token);
  33. }