Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf1fb6b

Browse files
committed
[#7081] some minor tweaks
1 parentbad6664 commitaf1fb6b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎security/json_login_setup.rst‎

Lines changed: 10 additions & 10 deletions
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 todefine anywhere in your application
63-
an empty controller associated with that URL:
62+
the authentication process. You just need toconfigure 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)

[8]ページ先頭

©2009-2025 Movatter.jp