<?php
declare(strict_types=1);
namespace Hitso\Bundle\AdminBundle\Controller\Admin;
use Anyx\LoginGateBundle\Service\BruteForceChecker;
use Hitso\Bundle\CommonBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
/**
* Class SecurityController
*
* @package Hitso\Bundle\AdminBundle\Controller\Admin
*/
class SecurityController extends Controller
{
/**
* @Route("/login", name="hitso_admin_login")
*/
public function loginAction(Request $request, BruteForceChecker $bruteForceChecker, AuthenticationUtils $authenticationUtils)
{
// $bruteForceChecker->getStorage()->clearCountAttempts($request);
return $this->displayTemplate('login', [
'error' => $authenticationUtils->getLastAuthenticationError(),
'username' => $authenticationUtils->getLastUsername(),
'canLogin' => $bruteForceChecker->canLogin($request),
]);
}
/**
* @Route("/logout", name="hitso_admin_logout")
*/
public function logoutAction()
{
}
}