AuthenticationSuccessHandlerInterface.php 963 B

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