src/Controller/SecurityController.php line 25

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Form\Security\SecurityLoginType;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Request;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
  8. use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  9. class SecurityController extends AbstractController
  10. {
  11.     /**
  12.      * @Route("/login", name="security_login")
  13.      */
  14.     public function login(Request $requestCsrfTokenManagerInterface $tokenManagerAuthenticationUtils $authenticationUtils)
  15.     {
  16.         return $this->render(
  17.             'security/login.html.twig',
  18.             [
  19.                 'csrf_token' => $tokenManager->getToken('authenticate')->getValue(),
  20.                 'error'      => $authenticationUtils->getLastAuthenticationError(),
  21.             ]
  22.         );
  23.     }
  24.     /**
  25.      * @Route("/logout", name="security_logout")
  26.      */
  27.     public function logout()
  28.     {
  29.     }
  30. }