Skip to content

Commit 319da0b

Browse files
committed
minor #10525 Update json_login_setup.rst (Laurent3170)
This PR was submitted for the 4.1 branch but it was merged into the 3.4 branch instead (closes #10525). Discussion ---------- 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. Commits ------- 78f6b84 Update json_login_setup.rst
2 parents 423cfa8 + 78f6b84 commit 319da0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/json_login_setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ path:
123123
124124
return $routes;
125125
126-
When you submit a ``POST`` request to the ``/login`` URL with the following JSON
126+
When you submit a ``POST`` request, with the header ``Content-Type: application/json``, to the ``/login`` URL with the following JSON
127127
document as the body, the security system intercepts the requests.
128128
It takes care of authenticating the user with the submitted username and password
129129
or triggers an error in case the authentication process fails.

0 commit comments

Comments
 (0)