<?php
namespace App\Controller\EndUserModule\Security;
use App\Controller\EndUserModule\BaseEndUserController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use Symfony\Component\Routing\Annotation\Route;
class AuthenticationController extends BaseEndUserController
{
/**
* @Route("", name="app_login")
*/
public function login(AuthenticationUtils $authenticationUtils, Request $request): Response
{
// get the login error if there is one
$error = $authenticationUtils->getLastAuthenticationError();
// last username entered by the user
$lastUsername = $authenticationUtils->getLastUsername();
$userAgent = $request->headers->get('User-Agent');
return $this->render('end_user_module/security/home.html.twig', ['last_username' => $lastUsername, 'error' => ($error != null)?$error->getMessage():null]);
}
/**
* @Route("/logout", name="app_logout")
*/
public function logout(): Response
{
}
}