@@ -55,12 +55,10 @@ First, enable the JSON login under your firewall:
5555
5656 .. tip ::
5757
58- The ``check_path `` can also be a route name (but cannot have mandatory wildcards - e.g.
59- ``/login/{foo} `` where ``foo `` has no default value).
58+ The ``check_path `` can also be a route name (but cannot have mandatory
59+ wildcards - e.g. ``/login/{foo} `` where ``foo `` has no default value).
6060
61- Now, when a request is made to the ``/login `` URL, the security system initiates
62- the authentication process. You just need to configure a route matching this
63- path:
61+ The next step is to configure a route in your app matching this path:
6462
6563.. configuration-block ::
6664
@@ -123,11 +121,9 @@ path:
123121
124122 return $routes;
125123
126- When you submit a ``POST `` request, with the header ``Content-Type: application/json ``, to the ``/login `` URL with the following JSON
127- document as the body, the security system intercepts the requests.
128- It takes care of authenticating the user with the submitted username and password
129- or triggers an error in case the authentication process fails.
130- If the authentication is successful, the controller defined earlier will be executed.
124+ Now, when you make a ``POST `` request, with the header ``Content-Type: application/json ``,
125+ to the ``/login `` URL with the following JSON document as the body, the security
126+ system intercepts the request and initiates the authentication process:
131127
132128.. code-block :: json
133129
@@ -136,6 +132,10 @@ If the authentication is successful, the controller defined earlier will be exec
136132 "password" : " MyPassword"
137133 }
138134
135+ Symfony takes care of authenticating the user with the submitted username and
136+ password or triggers an error in case the authentication process fails. If the
137+ authentication is successful, the controller defined earlier will be executed.
138+
139139If the JSON document has a different structure, you can specify the path to
140140access the ``username `` and ``password `` properties using the ``username_path ``
141141and ``password_path `` keys (they default respectively to ``username `` and
0 commit comments