From 2aa6eb76e67691719d72869eef820e37b7e44d29 Mon Sep 17 00:00:00 2001 From: Laurent Marquet Date: Fri, 19 Oct 2018 23:44:57 +0200 Subject: [PATCH] Update json_login_setup.rst As stated in https://stackoverflow.com/questions/47972237/symfony-4-json-authentication-not-working/49071038#49071038, which helped me to find why it did not work, the POST Request only works with the header `Content-Type: application/json`, so just adding it will make it clear to everyone --- security/json_login_setup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/json_login_setup.rst b/security/json_login_setup.rst index 0ca4a46856b..d50dae013ed 100644 --- a/security/json_login_setup.rst +++ b/security/json_login_setup.rst @@ -123,7 +123,7 @@ path: return $routes; -When you submit a ``POST`` request to the ``/login`` URL with the following JSON +When you submit a ``POST`` request, with the header ``Content-Type: application/json``, to the ``/login`` URL with the following JSON document as the body, the security system intercepts the requests. It takes care of authenticating the user with the submitted username and password or triggers an error in case the authentication process fails.