AuthenticationSuccessHandlerInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Symfony\Component\Security\Http\Authentication;
  3. use Symfony\Component\HttpKernel\Event\GetResponseEvent;
  4. use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
  5. use Symfony\Component\HttpFoundation\Request;
  6. /**
  7. * Interface for a custom authentication success handler
  8. *
  9. * If you want to customize the success handling process, instead of
  10. * overwriting the respective listener globally, you can set a custom success
  11. * handler which implements this interface.
  12. *
  13. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  14. */
  15. interface AuthenticationSuccessHandlerInterface
  16. {
  17. /**
  18. * This is called when an interactive authentication attempt succeeds. This
  19. * is called by authentication listeners inheriting from
  20. * AbstractAuthenticationListener.
  21. *
  22. * @param GetResponseEvent $event the "onCoreRequest" event, this event always
  23. * has the kernel as target
  24. * @param Request $request
  25. * @param TokenInterface $token
  26. *
  27. * @return Response the response to return
  28. */
  29. function onAuthenticationSuccess(GetResponseEvent $event, Request $request, TokenInterface $token);
  30. }