AuthenticationSuccessHandlerInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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\Security\Core\Authentication\Token\TokenInterface;
  12. use Symfony\Component\HttpFoundation\Request;
  13. /**
  14. * Interface for a custom authentication success handler
  15. *
  16. * If you want to customize the success handling process, instead of
  17. * overwriting the respective listener globally, you can set a custom success
  18. * handler which implements this interface.
  19. *
  20. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  21. */
  22. interface AuthenticationSuccessHandlerInterface
  23. {
  24. /**
  25. * This is called when an interactive authentication attempt succeeds. This
  26. * is called by authentication listeners inheriting from
  27. * AbstractAuthenticationListener.
  28. *
  29. * @param Request $request
  30. * @param TokenInterface $token
  31. *
  32. * @return Response never null
  33. */
  34. public function onAuthenticationSuccess(Request $request, TokenInterface $token);
  35. }