@@ -28,7 +28,6 @@ Configuration
28
28
**Basic Options **:
29
29
30
30
* `access_denied_url `_
31
- * `delete_cookies `_
32
31
* `erase_credentials `_
33
32
* `hide_user_not_found `_
34
33
* `session_fixation_strategy `_
@@ -52,81 +51,6 @@ access_denied_url
52
51
Defines the URL where the user is redirected after a ``403 `` HTTP error (unless
53
52
you define a custom access denial handler). Example: ``/no-permission ``
54
53
55
- delete_cookies
56
- ~~~~~~~~~~~~~~
57
-
58
- **type **: ``array `` **default **: ``[] ``
59
-
60
- Lists the names (and other optional features) of the cookies to delete when the
61
- user logs out::
62
-
63
- .. configuration-block ::
64
-
65
- .. code-block :: yaml
66
-
67
- # config/packages/security.yaml
68
- security :
69
- # ...
70
-
71
- firewalls :
72
- main :
73
- # ...
74
- logout :
75
- delete_cookies :
76
- cookie1-name : null
77
- cookie2-name :
78
- path : ' /'
79
- cookie3-name :
80
- path : null
81
- domain : example.com
82
-
83
- .. code-block :: xml
84
-
85
- <!-- config/packages/security.xml -->
86
- <?xml version =" 1.0" encoding =" UTF-8" ?>
87
- <srv : container xmlns =" http://symfony.com/schema/dic/security"
88
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
89
- xmlns : srv =" http://symfony.com/schema/dic/services"
90
- xsi : schemaLocation =" http://symfony.com/schema/dic/services
91
- https://symfony.com/schema/dic/services/services-1.0.xsd" >
92
-
93
- <config >
94
- <!-- ... -->
95
-
96
- <firewall name =" main" >
97
- <!-- ... -->
98
- <logout path =" ..." >
99
- <delete-cookie name =" cookie1-name" />
100
- <delete-cookie name =" cookie2-name" path =" /" />
101
- <delete-cookie name =" cookie3-name" domain =" example.com" />
102
- </logout >
103
- </firewall >
104
- </config >
105
- </srv : container >
106
-
107
- .. code-block :: php
108
-
109
- // config/packages/security.php
110
- $container->loadFromExtension('security', [
111
- // ...
112
- 'firewalls' => [
113
- 'main' => [
114
- 'logout' => [
115
- 'delete_cookies' => [
116
- 'cookie1-name' => null,
117
- 'cookie2-name' => [
118
- 'path' => '/',
119
- ],
120
- 'cookie3-name' => [
121
- 'path' => null,
122
- 'domain' => 'example.com',
123
- ],
124
- ],
125
- ],
126
- ],
127
- ],
128
- ]);
129
-
130
54
erase_credentials
131
55
~~~~~~~~~~~~~~~~~
132
56
@@ -418,6 +342,81 @@ redirected to the ``default_target_path`` to avoid a redirection loop.
418
342
419
343
**Options Related to Logout Configuration **
420
344
345
+ delete_cookies
346
+ ~~~~~~~~~~~~~~
347
+
348
+ **type **: ``array `` **default **: ``[] ``
349
+
350
+ Lists the names (and other optional features) of the cookies to delete when the
351
+ user logs out::
352
+
353
+ .. configuration-block ::
354
+
355
+ .. code-block :: yaml
356
+
357
+ # config/packages/security.yaml
358
+ security :
359
+ # ...
360
+
361
+ firewalls :
362
+ main :
363
+ # ...
364
+ logout :
365
+ delete_cookies :
366
+ cookie1-name : null
367
+ cookie2-name :
368
+ path : ' /'
369
+ cookie3-name :
370
+ path : null
371
+ domain : example.com
372
+
373
+ .. code-block :: xml
374
+
375
+ <!-- config/packages/security.xml -->
376
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
377
+ <srv : container xmlns =" http://symfony.com/schema/dic/security"
378
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
379
+ xmlns : srv =" http://symfony.com/schema/dic/services"
380
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
381
+ https://symfony.com/schema/dic/services/services-1.0.xsd" >
382
+
383
+ <config >
384
+ <!-- ... -->
385
+
386
+ <firewall name =" main" >
387
+ <!-- ... -->
388
+ <logout path =" ..." >
389
+ <delete-cookie name =" cookie1-name" />
390
+ <delete-cookie name =" cookie2-name" path =" /" />
391
+ <delete-cookie name =" cookie3-name" domain =" example.com" />
392
+ </logout >
393
+ </firewall >
394
+ </config >
395
+ </srv : container >
396
+
397
+ .. code-block :: php
398
+
399
+ // config/packages/security.php
400
+ $container->loadFromExtension('security', [
401
+ // ...
402
+ 'firewalls' => [
403
+ 'main' => [
404
+ 'logout' => [
405
+ 'delete_cookies' => [
406
+ 'cookie1-name' => null,
407
+ 'cookie2-name' => [
408
+ 'path' => '/',
409
+ ],
410
+ 'cookie3-name' => [
411
+ 'path' => null,
412
+ 'domain' => 'example.com',
413
+ ],
414
+ ],
415
+ ],
416
+ ],
417
+ ],
418
+ ]);
419
+
421
420
invalidate_session
422
421
~~~~~~~~~~~~~~~~~~
423
422
0 commit comments