@@ -59,8 +59,8 @@ First, enable the JSON login under your firewall:
5959 ``/login/{foo} `` where ``foo `` has no default value).
6060
6161Now, when a request is made to the ``/login `` URL, the security system initiates
62- the authentication process. You just need to define anywhere in your application
63- an empty controller associated with that URL :
62+ the authentication process. You just need to configure a route matching this
63+ path :
6464
6565.. configuration-block ::
6666
@@ -103,7 +103,7 @@ an empty controller associated with that URL:
103103 </route >
104104 </routes >
105105
106- .. code-block :: php
106+ .. code-block :: php
107107
108108 // app/config/routing.php
109109 use Symfony\Component\Routing\RouteCollection;
@@ -117,9 +117,10 @@ an empty controller associated with that URL:
117117 return $collection;
118118
119119 Don't let this empty controller confuse you. When you submit a ``POST `` request
120- to the ``/login `` URL with the following JSON document as body, the security
121- system automatically handles it and takes care of checking the submitted
122- username and password and authenticating the user or throwing an error:
120+ to the ``/login `` URL with the following JSON document as the body, the security
121+ system intercepts the requests. It takes care of authenticating the user with
122+ the submitted username and password or triggers an error in case the authentication
123+ process fails:
123124
124125.. code-block :: json
125126
@@ -129,10 +130,9 @@ username and password and authenticating the user or throwing an error:
129130 }
130131
131132 If the JSON document has a different structure, you can specify the path to
132- access to the user and password properties using the ``username_path `` and
133- ``password_path `` keys (they default respectively to ``username `` and ``password ``).
134-
135- For example, if the JSON document has the following structure:
133+ access the ``username `` and ``password `` properties using the ``username_path ``
134+ and ``password_path `` keys (they default respectively to ``username `` and
135+ ``password ``). For example, if the JSON document has the following structure:
136136
137137.. code-block :: json
138138
0 commit comments