From 06127bfeeee9d3571c4dcbe4d302f5fa6cf3a49a Mon Sep 17 00:00:00 2001 From: Vincent Chareunphol Date: Fri, 20 Oct 2023 07:48:19 +0200 Subject: [PATCH] Add post method attribute to json login --- security.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security.rst b/security.rst index 5a44ca2122b..3eadb77f384 100644 --- a/security.rst +++ b/security.rst @@ -1054,7 +1054,7 @@ token (or whatever you need to return) and return the JSON response: class ApiLoginController extends AbstractController { - #[Route('/api/login', name: 'api_login')] + #[Route('/api/login', name: 'api_login', methods: ['POST'])] - public function index(): Response + public function index(#[CurrentUser] ?User $user): Response {