File tree 1 file changed +69
-1
lines changed
1 file changed +69
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,75 @@ delete_cookies
81
81
82
82
**type **: ``array `` **default **: ``[] ``
83
83
84
- Lists the names of the cookies to delete when the user logs out.
84
+ Lists the names (and other optional features) of the cookies to delete when the
85
+ user logs out::
86
+
87
+ .. configuration-block ::
88
+
89
+ .. code-block :: yaml
90
+
91
+ # config/packages/security.yaml
92
+ security :
93
+ # ...
94
+
95
+ firewalls :
96
+ main :
97
+ # ...
98
+ logout :
99
+ delete_cookies :
100
+ cookie1-name : null
101
+ cookie2-name :
102
+ path : ' /'
103
+ cookie3-name :
104
+ path : null
105
+ domain : example.com
106
+
107
+ .. code-block :: xml
108
+
109
+ <!-- config/packages/security.xml -->
110
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
111
+ <srv : container xmlns =" http://symfony.com/schema/dic/security"
112
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
113
+ xmlns : srv =" http://symfony.com/schema/dic/services"
114
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
115
+ https://symfony.com/schema/dic/services/services-1.0.xsd" >
116
+
117
+ <config >
118
+ <!-- ... -->
119
+
120
+ <firewall name =" main" >
121
+ <!-- ... -->
122
+ <logout path =" ..." >
123
+ <delete-cookie name =" cookie1-name" />
124
+ <delete-cookie name =" cookie2-name" path =" /" />
125
+ <delete-cookie name =" cookie3-name" domain =" example.com" />
126
+ </logout >
127
+ </firewall >
128
+ </config >
129
+ </srv : container >
130
+
131
+ .. code-block :: php
132
+
133
+ // config/packages/security.php
134
+ $container->loadFromExtension('security', [
135
+ // ...
136
+ 'firewalls' => [
137
+ 'main' => [
138
+ 'logout' => [
139
+ 'delete_cookies' => [
140
+ 'cookie1-name' => null,
141
+ 'cookie2-name' => [
142
+ 'path' => '/',
143
+ ],
144
+ 'cookie3-name' => [
145
+ 'path' => null,
146
+ 'domain' => 'example.com',
147
+ ],
148
+ ],
149
+ ],
150
+ ],
151
+ ],
152
+ ]);
85
153
86
154
erase_credentials
87
155
~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments