initial commit
This commit is contained in:
parent
cf0fd55dd0
commit
fe08504340
|
@ -8,27 +8,23 @@ use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class SecurityController extends AbstractController
|
class SecurityController extends AbstractController
|
||||||
{
|
{
|
||||||
#[Route(path: '/login', name: 'app_login')]
|
#[Route(path: '/login', name: 'app_login')]
|
||||||
public function login(AuthenticationUtils $authenticationUtils): Response
|
public function login(AuthenticationUtils $authenticationUtils): Response
|
||||||
{
|
{
|
||||||
return $this->render(view: 'security/login.html.twig', parameters: [
|
return $this->render(view: 'security/login.html.twig', parameters: [
|
||||||
'error' => $authenticationUtils->getLastAuthenticationError(),
|
'error' => $authenticationUtils->getLastAuthenticationError(),
|
||||||
'last_username' => $authenticationUtils->getLastUsername()
|
'last_username' => $authenticationUtils->getLastUsername(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
/**
|
* @return mixed
|
||||||
* @return mixed
|
*/
|
||||||
*/
|
#[Route(path: '/logout', name: 'app_logout')]
|
||||||
#[Route(path: '/logout', name: 'app_logout')]
|
public function logout(): mixed
|
||||||
public function logout()
|
{
|
||||||
{
|
throw new Exception(message: 'Logout should never be reached.');
|
||||||
throw new Exception(message: 'Logout should never be reached.');
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue