@@ -12,92 +12,9 @@ configuration is shown in the next section.
12
12
Form Login Configuration Reference
13
13
----------------------------------
14
14
15
- .. configuration-block ::
16
-
17
- .. code-block :: yaml
18
-
19
- # app/config/security.yml
20
- security :
21
- firewalls :
22
- main :
23
- form_login :
24
- # the user is redirected here when he/she needs to login
25
- login_path : /login
26
-
27
- # if true, forward the user to the login form instead of redirecting
28
- use_forward : false
29
-
30
- # submit the login form here
31
- check_path : /login_check
32
-
33
- # by default, the login form *must* be a POST, not a GET
34
- post_only : true
35
-
36
- # login success redirecting options (read further below)
37
- always_use_default_target_path : false
38
- default_target_path : /
39
- target_path_parameter : _target_path
40
- use_referer : false
41
-
42
- # login failure redirecting options (read further below)
43
- failure_path : null
44
- failure_forward : false
45
-
46
- # field names for the username and password fields
47
- username_parameter : _username
48
- password_parameter : _password
49
-
50
- # csrf token options
51
- csrf_parameter : _csrf_token
52
- intention : authenticate
53
-
54
- .. code-block :: xml
55
-
56
- <!-- app/config/security.xml -->
57
- <config >
58
- <firewall >
59
- <form-login
60
- check_path =" /login_check"
61
- login_path =" /login"
62
- use_forward =" false"
63
- always_use_default_target_path =" false"
64
- default_target_path =" /"
65
- target_path_parameter =" _target_path"
66
- use_referer =" false"
67
- failure_path =" null"
68
- failure_forward =" false"
69
- username_parameter =" _username"
70
- password_parameter =" _password"
71
- csrf_parameter =" _csrf_token"
72
- intention =" authenticate"
73
- post_only =" true"
74
- />
75
- </firewall >
76
- </config >
77
-
78
- .. code-block :: php
79
-
80
- // app/config/security.php
81
- $container->loadFromExtension('security', array(
82
- 'firewalls' => array(
83
- 'main' => array('form_login' => array(
84
- 'check_path' => '/login_check',
85
- 'login_path' => '/login',
86
- 'user_forward' => false,
87
- 'always_use_default_target_path' => false,
88
- 'default_target_path' => '/',
89
- 'target_path_parameter' => _target_path,
90
- 'use_referer' => false,
91
- 'failure_path' => null,
92
- 'failure_forward' => false,
93
- 'username_parameter' => '_username',
94
- 'password_parameter' => '_password',
95
- 'csrf_parameter' => '_csrf_token',
96
- 'intention' => 'authenticate',
97
- 'post_only' => true,
98
- )),
99
- ),
100
- ));
15
+ To see the full form login configuration reference, see
16
+ :doc: `/reference/configuration/security `. Some of the more interesting options
17
+ are explained below.
101
18
102
19
Redirecting after Success
103
20
-------------------------
0 commit comments