src/TSMS/TsmsBundle/EventListener/NullInteractiveLoginListener.php line 29

Open in your IDE?
  1. <?php
  2. /**
  3. * Copyright (C) SUEZ Smart Solutions - All Rights Reserved
  4. * On’Connect Gateway Management, 2018
  5. * Unauthorized copying of this file, via any medium is strictly prohibited
  6. * Proprietary and confidential
  7. * For the full copyright and license information, please report to the LICENSE CONTRACT.
  8. */
  9. namespace TSMS\TsmsBundle\EventListener;
  10. use FOS\UserBundle\Model\UserManagerInterface;
  11. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  12. use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
  13. /**
  14.  * Class NullInteractiveLoginListener.
  15.  *
  16.  * This class is used to overwrite the interactive login listener from FOS Bundle
  17.  *
  18.  * The action done by FOS Bundle is replicated in :
  19.  * `TSMS\TsmsBundle\Security\Handler:onAuthenticationSuccess`
  20.  */
  21. class NullInteractiveLoginListener implements EventSubscriberInterface
  22. {
  23.     public function __construct(UserManagerInterface $userManager)
  24.     {}
  25.     public function onSecurityInteractiveLogin($event)
  26.     {
  27.         return;
  28.     }
  29.     /**
  30.      * @return array The event names to listen to
  31.      */
  32.     public static function getSubscribedEvents()
  33.     {
  34.         return array(
  35.             'kernel.request' => 'onSecurityInteractiveLogin',
  36.         );
  37.     }
  38. }