src/Hitso/Bundle/AdminBundle/Controller/Admin/SecurityController.php line 30

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Hitso\Bundle\AdminBundle\Controller\Admin;
  4. use Anyx\LoginGateBundle\Service\BruteForceChecker;
  5. use Hitso\Bundle\CommonBundle\Controller\Controller;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  9. /**
  10.  * Class SecurityController
  11.  *
  12.  * @package Hitso\Bundle\AdminBundle\Controller\Admin
  13.  */
  14. class SecurityController extends Controller
  15. {
  16.     /**
  17.      * @Route("/login", name="hitso_admin_login")
  18.      */
  19.     public function loginAction(Request $requestBruteForceChecker $bruteForceCheckerAuthenticationUtils $authenticationUtils)
  20.     {
  21.         // $bruteForceChecker->getStorage()->clearCountAttempts($request);
  22.         return $this->displayTemplate('login', [
  23.             'error'    => $authenticationUtils->getLastAuthenticationError(),
  24.             'username' => $authenticationUtils->getLastUsername(),
  25.             'canLogin' => $bruteForceChecker->canLogin($request),
  26.         ]);
  27.     }
  28.     /**
  29.      * @Route("/logout", name="hitso_admin_logout")
  30.      */
  31.     public function logoutAction()
  32.     {
  33.     }
  34. }