File tree Expand file tree Collapse file tree 2 files changed +71
-4
lines changed Expand file tree Collapse file tree 2 files changed +71
-4
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,77 @@ access_denied_url
48
48
Defines the URL where the user is redirected after a ``403 `` HTTP error (unless
49
49
you define a custom access denial handler). Example: ``/no-permission ``
50
50
51
+ delete_cookies
52
+ ~~~~~~~~~~~~~~
53
+
54
+ **type **: ``array `` **default **: ``[] ``
55
+
56
+ Lists the names (and other optional features) of the cookies to delete when the
57
+ user logs out::
58
+
59
+ .. configuration-block ::
60
+
61
+ .. code-block :: yaml
62
+
63
+ # config/packages/security.yaml
64
+ security :
65
+ # ...
66
+
67
+ firewalls :
68
+ main :
69
+ # ...
70
+ logout :
71
+ delete_cookies :
72
+ cookie1-name : null
73
+ cookie2-name :
74
+ path : ' /'
75
+ cookie3-name :
76
+ path : null
77
+ domain : example.com
78
+
79
+ .. code-block :: xml
80
+
81
+ <!-- config/packages/security.xml -->
82
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
83
+ <srv : container xmlns =" http://symfony.com/schema/dic/security"
84
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
85
+ xmlns : srv =" http://symfony.com/schema/dic/services"
86
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
87
+ https://symfony.com/schema/dic/services/services-1.0.xsd" >
88
+
89
+ <config >
90
+ <!-- ... -->
91
+
92
+ <firewall name =" main" >
93
+ <!-- ... -->
94
+ <logout path =" ..." >
95
+ <delete-cookie name =" cookie1-name" />
96
+ <delete-cookie name =" cookie2-name" path =" /" />
97
+ <delete-cookie name =" cookie3-name" domain =" example.com" />
98
+ </logout >
99
+ </firewall >
100
+ </config >
101
+ </srv : container >
102
+
103
+ .. code-block :: php
104
+
105
+ // config/packages/security.php
106
+
107
+ // ...
108
+
109
+ return static function (SecurityConfig $securityConfig): void {
110
+ // ...
111
+
112
+ $securityConfig->firewall('main')
113
+ ->logout()
114
+ ->deleteCookie('cookie1-name')
115
+ ->deleteCookie('cookie2-name')
116
+ ->path('/')
117
+ ->deleteCookie('cookie3-name')
118
+ ->path(null)
119
+ ->domain('example.com');
120
+ };
121
+
51
122
erase_credentials
52
123
~~~~~~~~~~~~~~~~~
53
124
Original file line number Diff line number Diff line change @@ -1034,10 +1034,6 @@ Autconfiguration also works with attributes. Some attributes like
1034
1034
for autoconfiguration. Any class using these attributes will have tags applied
1035
1035
to them.
1036
1036
1037
- .. versionadded :: 5.3
1038
-
1039
- Autoconfiguration through attributes was introduced in Symfony 5.3.
1040
-
1041
1037
Linting Service Definitions
1042
1038
---------------------------
1043
1039
You can’t perform that action at this time.
0 commit comments