<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
class SecurityController extends AbstractController
{
/**
* @Route("/admin/login", name="account_admin_login")
*/
public function index(AuthenticationUtils $utils): Response
{
$error = $utils->getLastAuthenticationError();
$username = $utils->getLastUsername();
return $this->render('security/index.html.twig', ['hasError' => $error !== null, 'username' => $username]);
}
/**
* @Route("/login_check", name="login_check")
*/
public function check()
{
throw new \LogicException('This code should never be reached');
}
}