<?php
namespace App\Controller\Base;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
class SecurityController extends AbstractController
{
#[Route(path: '/login', name: '_wob_security_login')]
public function login(AuthenticationUtils $authenticationUtils): Response
{
return $this->render('base/Security/login.html.twig', [
'last_username' => $authenticationUtils->getLastUsername(),
'error' => $authenticationUtils->getLastAuthenticationError(),
]);
}
#[Route(path: '/logout', name: '_wob_security_logout')]
public function logout()
{
// The security layer will intercept this request
}
}