@@ -248,41 +248,65 @@ For even more details, see :doc:`/cookbook/security/form_login`.
248248The Login Form and Process
249249~~~~~~~~~~~~~~~~~~~~~~~~~~
250250
251- * ``login_path `` (type: ``string ``, default: ``/login ``)
252- This is the route or path that the user will be redirected to (unless
253- ``use_forward `` is set to ``true ``) when they try to access a
254- protected resource but isn't fully authenticated.
255-
256- This path **must ** be accessible by a normal, un-authenticated user,
257- else you may create a redirect loop. For details, see
258- ":ref: `Avoid Common Pitfalls <book-security-common-pitfalls >`".
259-
260- * ``check_path `` (type: ``string ``, default: ``/login_check ``)
261- This is the route or path that your login form must submit to. The
262- firewall will intercept any requests (``POST `` requests only, by default)
263- to this URL and process the submitted login credentials.
264-
265- Be sure that this URL is covered by your main firewall (i.e. don't create
266- a separate firewall just for ``check_path `` URL).
267-
268- * ``use_forward `` (type: ``Boolean ``, default: ``false ``)
269- If you'd like the user to be forwarded to the login form instead of
270- being redirected, set this option to ``true ``.
271-
272- * ``username_parameter `` (type: ``string ``, default: ``_username ``)
273- This is the field name that you should give to the username field of
274- your login form. When you submit the form to ``check_path ``, the security
275- system will look for a POST parameter with this name.
276-
277- * ``password_parameter `` (type: ``string ``, default: ``_password ``)
278- This is the field name that you should give to the password field of
279- your login form. When you submit the form to ``check_path ``, the security
280- system will look for a POST parameter with this name.
281-
282- * ``post_only `` (type: ``Boolean ``, default: ``true ``)
283- By default, you must submit your login form to the ``check_path `` URL
284- as a POST request. By setting this option to ``false ``, you can send a
285- GET request to the ``check_path `` URL.
251+ login_path
252+ ..........
253+
254+ **type **: ``string `` **default **: ``/login ``
255+
256+ This is the route or path that the user will be redirected to (unless ``use_forward ``
257+ is set to ``true ``) when they try to access a protected resource but isn't
258+ fully authenticated.
259+
260+ This path **must ** be accessible by a normal, un-authenticated user, else
261+ you may create a redirect loop. For details, see
262+ ":ref: `Avoid Common Pitfalls <book-security-common-pitfalls >`".
263+
264+ check_path
265+ ..........
266+
267+ **type **: ``string `` **default **: ``/login_check ``
268+
269+ This is the route or path that your login form must submit to. The firewall
270+ will intercept any requests (``POST `` requests only, by default) to this
271+ URL and process the submitted login credentials.
272+
273+ Be sure that this URL is covered by your main firewall (i.e. don't create
274+ a separate firewall just for ``check_path `` URL).
275+
276+ use_forward
277+ ...........
278+
279+ **type **: ``Boolean `` **default **: ``false ``
280+
281+ If you'd like the user to be forwarded to the login form instead of being
282+ redirected, set this option to ``true ``.
283+
284+ username_parameter
285+ ..................
286+
287+ **type **: ``string `` **default **: ``_username ``
288+
289+ This is the field name that you should give to the username field of your
290+ login form. When you submit the form to ``check_path ``, the security system
291+ will look for a POST parameter with this name.
292+
293+ password_parameter
294+ ..................
295+
296+ **type **: ``string `` **default **: ``_password ``
297+
298+ This is the field name that you should give to the password field of your
299+ login form. When you submit the form to ``check_path ``, the security system
300+ will look for a POST parameter with this name.
301+
302+ post_only
303+ .........
304+
305+ **type **: ``Boolean `` **default **: ``true ``
306+
307+ By default, you must submit your login form to the ``check_path `` URL as
308+ a POST request. By setting this option to ``false ``, you can send a GET request
309+ to the ``check_path `` URL.
286310
287311Redirecting after Login
288312~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments