<?php
namespace App\Controller\BackOffice;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
/**
* Class SecurityController
* @package App\Controller\BackOffice
*/
class SecurityController extends AbstractController
{
/**
* @var AuthenticationUtils
*/
private $authenticationUtils;
/**
* SecurityController constructor.
* @param AuthenticationUtils $authenticationUtils
*/
public function __construct(AuthenticationUtils $authenticationUtils)
{
$this->authenticationUtils = $authenticationUtils;
}
/**
* @Route(path="/login", methods={"GET", "POST"})
*/
public function indexAction()
{
$error = $this->authenticationUtils->getLastAuthenticationError();
$lastUsername = $this->authenticationUtils->getLastUsername();
return $this->render(
'backOffice/security/login.html.twig',
[
'lastUsername' => $lastUsername,
'error' => $error,
]
);
}
/**
* @Route("/logout", name="app_logout", methods={"GET"})
*/
public function logout()
{
}
}