Skip to content

Commit af1fb6b

Browse files
committed
[#7081] some minor tweaks
1 parent bad6664 commit af1fb6b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

security/json_login_setup.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ First, enable the JSON login under your firewall:
5959
``/login/{foo}`` where ``foo`` has no default value).
6060

6161
Now, 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

Comments
 (0)