Skip to content

Commit ba3eb8d

Browse files
committed
Use routes for security paths, instead of raw paths
1 parent eed8e46 commit ba3eb8d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

book/security.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ First, enable form login under your firewall:
296296
pattern: ^/
297297
anonymous: ~
298298
form_login:
299-
login_path: /login
300-
check_path: /login_check
299+
login_path: login
300+
check_path: login_check
301301
302302
.. code-block:: xml
303303
@@ -355,10 +355,11 @@ First, enable form login under your firewall:
355355
'form_login' => array(),
356356
357357
Now, when the security system initiates the authentication process, it will
358-
redirect the user to the login form (``/login`` by default). Implementing
359-
this login form visually is your job. First, create two routes: one that
360-
will display the login form (i.e. ``/login``) and one that will handle the
361-
login form submission (i.e. ``/login_check``):
358+
redirect the user to the login form (``/login`` by default). Implementing this
359+
login form visually is your job. First, the create two routes we used in the
360+
security configuration: the ``login`` route will display the login form (i.e.
361+
``/login``) and the ``login_check`` route will handle the login form
362+
submission (i.e. ``/login_check``):
362363

363364
.. configuration-block::
364365

reference/configuration/security.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,16 @@ The Login Form and Process
218218
~~~~~~~~~~~~~~~~~~~~~~~~~~
219219

220220
* ``login_path`` (type: ``string``, default: ``/login``)
221-
This is the URL that the user will be redirected to (unless ``use_forward``
221+
This is the path that the user will be redirected to (unless ``use_forward``
222222
is set to ``true``) when he/she tries to access a protected resource
223223
but isn't fully authenticated.
224224

225-
This URL **must** be accessible by a normal, un-authenticated user, else
225+
This path **must** be accessible by a normal, un-authenticated user, else
226226
you may create a redirect loop. For details, see
227227
":ref:`Avoid Common Pitfalls<book-security-common-pitfalls>`".
228228

229229
* ``check_path`` (type: ``string``, default: ``/login_check``)
230-
This is the URL that your login form must submit to. The firewall will
230+
This is the path that your login form must submit to. The firewall will
231231
intercept any requests (``POST`` requests only, by default) to this URL
232232
and process the submitted login credentials.
233233

0 commit comments

Comments
 (0)