{"action":"created","comment":{"url":"https://api.github.com/repos/silexphp/Silex/pulls/comments/25937226","id":25937226,"diff_hunk":"@@ -469,6 +470,32 @@ public function register(Application $app)\n \n                 $listener->addHandler(new SessionLogoutHandler());\n \n+                $removeCookies = isset($options['remove_cookies']) ? $options['remove_cookies'] : null;\n+                if (null !== $removeCookies) {\n+                    $cookies = array();\n+\n+                    foreach ($removeCookies as $key => $value) {\n+                        if (is_array($value)) {\n+                            // Check for existence of method parameters otherwise\n+                            // use default values given by ResponseHeaderBag:clearCookie()\n+                            if (!isset($value['path'])) {\n+                                $value['path'] = '/';","path":"src/Silex/Provider/SecurityServiceProvider.php","position":21,"original_position":21,"commit_id":"aa2e3bb149877988d45147651e5fd24e3a358695","original_commit_id":"aa2e3bb149877988d45147651e5fd24e3a358695","user":{"login":"GromNaN","id":400034,"avatar_url":"https://avatars.githubusercontent.com/u/400034?v=3","gravatar_id":"","url":"https://api.github.com/users/GromNaN","html_url":"https://github.com/GromNaN","followers_url":"https://api.github.com/users/GromNaN/followers","following_url":"https://api.github.com/users/GromNaN/following{/other_user}","gists_url":"https://api.github.com/users/GromNaN/gists{/gist_id}","starred_url":"https://api.github.com/users/GromNaN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GromNaN/subscriptions","organizations_url":"https://api.github.com/users/GromNaN/orgs","repos_url":"https://api.github.com/users/GromNaN/repos","events_url":"https://api.github.com/users/GromNaN/events{/privacy}","received_events_url":"https://api.github.com/users/GromNaN/received_events","type":"User","site_admin":false},"body":"It would be nice if the `CookieClearingLogoutHandler` could make this check itself.","created_at":"2015-03-06T10:41:23Z","updated_at":"2015-03-06T10:41:23Z","html_url":"https://github.com/silexphp/Silex/pull/918#discussion_r25937226","pull_request_url":"https://api.github.com/repos/silexphp/Silex/pulls/918","_links":{"self":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/comments/25937226"},"html":{"href":"https://github.com/silexphp/Silex/pull/918#discussion_r25937226"},"pull_request":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/918"}}},"pull_request":{"url":"https://api.github.com/repos/silexphp/Silex/pulls/918","id":13278865,"html_url":"https://github.com/silexphp/Silex/pull/918","diff_url":"https://github.com/silexphp/Silex/pull/918.diff","patch_url":"https://github.com/silexphp/Silex/pull/918.patch","issue_url":"https://api.github.com/repos/silexphp/Silex/issues/918","number":918,"state":"open","locked":false,"title":"Support automatic cookie removal on logout","user":{"login":"CSchulz","id":1520593,"avatar_url":"https://avatars.githubusercontent.com/u/1520593?v=3","gravatar_id":"","url":"https://api.github.com/users/CSchulz","html_url":"https://github.com/CSchulz","followers_url":"https://api.github.com/users/CSchulz/followers","following_url":"https://api.github.com/users/CSchulz/following{/other_user}","gists_url":"https://api.github.com/users/CSchulz/gists{/gist_id}","starred_url":"https://api.github.com/users/CSchulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSchulz/subscriptions","organizations_url":"https://api.github.com/users/CSchulz/orgs","repos_url":"https://api.github.com/users/CSchulz/repos","events_url":"https://api.github.com/users/CSchulz/events{/privacy}","received_events_url":"https://api.github.com/users/CSchulz/received_events","type":"User","site_admin":false},"body":"Support of cookie destroying on logout by adding \"remove_cookies: { 'cookieName1', 'cookieName2':  { 'path': '/', 'domain': null } }\" in your configuration e.g.\r\n\r\n```\r\n$app['security.firewalls'] = array(\r\n[...]\r\n\t\t'logout' => array(\r\n\t\t\t'logout_path' => '/user/logout',\r\n\t\t\t'remove_cookies' => array('cookieName1', 'cookieName2' => array('path' => '/', 'domain' => null))\r\n\t\t),\r\n[...]\r\n);\r\n```\r\n\r\nBased on discussion https://groups.google.com/d/topic/silex-php/828UcSi7bks/discussion","created_at":"2014-03-06T19:55:36Z","updated_at":"2015-03-06T10:41:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09f1d21d4f029e0923cec0611a6f15bb2be1a0c7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/silexphp/Silex/pulls/918/commits","review_comments_url":"https://api.github.com/repos/silexphp/Silex/pulls/918/comments","review_comment_url":"https://api.github.com/repos/silexphp/Silex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silexphp/Silex/issues/918/comments","statuses_url":"https://api.github.com/repos/silexphp/Silex/statuses/aa2e3bb149877988d45147651e5fd24e3a358695","head":{"label":"CSchulz:remove_cookies_on_logout","ref":"remove_cookies_on_logout","sha":"aa2e3bb149877988d45147651e5fd24e3a358695","user":{"login":"CSchulz","id":1520593,"avatar_url":"https://avatars.githubusercontent.com/u/1520593?v=3","gravatar_id":"","url":"https://api.github.com/users/CSchulz","html_url":"https://github.com/CSchulz","followers_url":"https://api.github.com/users/CSchulz/followers","following_url":"https://api.github.com/users/CSchulz/following{/other_user}","gists_url":"https://api.github.com/users/CSchulz/gists{/gist_id}","starred_url":"https://api.github.com/users/CSchulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSchulz/subscriptions","organizations_url":"https://api.github.com/users/CSchulz/orgs","repos_url":"https://api.github.com/users/CSchulz/repos","events_url":"https://api.github.com/users/CSchulz/events{/privacy}","received_events_url":"https://api.github.com/users/CSchulz/received_events","type":"User","site_admin":false},"repo":{"id":17490250,"name":"Silex","full_name":"CSchulz/Silex","owner":{"login":"CSchulz","id":1520593,"avatar_url":"https://avatars.githubusercontent.com/u/1520593?v=3","gravatar_id":"","url":"https://api.github.com/users/CSchulz","html_url":"https://github.com/CSchulz","followers_url":"https://api.github.com/users/CSchulz/followers","following_url":"https://api.github.com/users/CSchulz/following{/other_user}","gists_url":"https://api.github.com/users/CSchulz/gists{/gist_id}","starred_url":"https://api.github.com/users/CSchulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSchulz/subscriptions","organizations_url":"https://api.github.com/users/CSchulz/orgs","repos_url":"https://api.github.com/users/CSchulz/repos","events_url":"https://api.github.com/users/CSchulz/events{/privacy}","received_events_url":"https://api.github.com/users/CSchulz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CSchulz/Silex","description":"The PHP micro-framework based on the Symfony2 Components ","fork":true,"url":"https://api.github.com/repos/CSchulz/Silex","forks_url":"https://api.github.com/repos/CSchulz/Silex/forks","keys_url":"https://api.github.com/repos/CSchulz/Silex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CSchulz/Silex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CSchulz/Silex/teams","hooks_url":"https://api.github.com/repos/CSchulz/Silex/hooks","issue_events_url":"https://api.github.com/repos/CSchulz/Silex/issues/events{/number}","events_url":"https://api.github.com/repos/CSchulz/Silex/events","assignees_url":"https://api.github.com/repos/CSchulz/Silex/assignees{/user}","branches_url":"https://api.github.com/repos/CSchulz/Silex/branches{/branch}","tags_url":"https://api.github.com/repos/CSchulz/Silex/tags","blobs_url":"https://api.github.com/repos/CSchulz/Silex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CSchulz/Silex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CSchulz/Silex/git/refs{/sha}","trees_url":"https://api.github.com/repos/CSchulz/Silex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CSchulz/Silex/statuses/{sha}","languages_url":"https://api.github.com/repos/CSchulz/Silex/languages","stargazers_url":"https://api.github.com/repos/CSchulz/Silex/stargazers","contributors_url":"https://api.github.com/repos/CSchulz/Silex/contributors","subscribers_url":"https://api.github.com/repos/CSchulz/Silex/subscribers","subscription_url":"https://api.github.com/repos/CSchulz/Silex/subscription","commits_url":"https://api.github.com/repos/CSchulz/Silex/commits{/sha}","git_commits_url":"https://api.github.com/repos/CSchulz/Silex/git/commits{/sha}","comments_url":"https://api.github.com/repos/CSchulz/Silex/comments{/number}","issue_comment_url":"https://api.github.com/repos/CSchulz/Silex/issues/comments{/number}","contents_url":"https://api.github.com/repos/CSchulz/Silex/contents/{+path}","compare_url":"https://api.github.com/repos/CSchulz/Silex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CSchulz/Silex/merges","archive_url":"https://api.github.com/repos/CSchulz/Silex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CSchulz/Silex/downloads","issues_url":"https://api.github.com/repos/CSchulz/Silex/issues{/number}","pulls_url":"https://api.github.com/repos/CSchulz/Silex/pulls{/number}","milestones_url":"https://api.github.com/repos/CSchulz/Silex/milestones{/number}","notifications_url":"https://api.github.com/repos/CSchulz/Silex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CSchulz/Silex/labels{/name}","releases_url":"https://api.github.com/repos/CSchulz/Silex/releases{/id}","created_at":"2014-03-06T19:45:36Z","updated_at":"2014-03-06T22:43:34Z","pushed_at":"2014-03-06T22:43:33Z","git_url":"git://github.com/CSchulz/Silex.git","ssh_url":"git@github.com:CSchulz/Silex.git","clone_url":"https://github.com/CSchulz/Silex.git","svn_url":"https://github.com/CSchulz/Silex","homepage":"silex.sensiolabs.org","size":2754,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"silexphp:master","ref":"master","sha":"b40e5b2bd3c550424e96104545c31da1023d7f66","user":{"login":"silexphp","id":3840103,"avatar_url":"https://avatars.githubusercontent.com/u/3840103?v=3","gravatar_id":"","url":"https://api.github.com/users/silexphp","html_url":"https://github.com/silexphp","followers_url":"https://api.github.com/users/silexphp/followers","following_url":"https://api.github.com/users/silexphp/following{/other_user}","gists_url":"https://api.github.com/users/silexphp/gists{/gist_id}","starred_url":"https://api.github.com/users/silexphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silexphp/subscriptions","organizations_url":"https://api.github.com/users/silexphp/orgs","repos_url":"https://api.github.com/users/silexphp/repos","events_url":"https://api.github.com/users/silexphp/events{/privacy}","received_events_url":"https://api.github.com/users/silexphp/received_events","type":"Organization","site_admin":false},"repo":{"id":914985,"name":"Silex","full_name":"silexphp/Silex","owner":{"login":"silexphp","id":3840103,"avatar_url":"https://avatars.githubusercontent.com/u/3840103?v=3","gravatar_id":"","url":"https://api.github.com/users/silexphp","html_url":"https://github.com/silexphp","followers_url":"https://api.github.com/users/silexphp/followers","following_url":"https://api.github.com/users/silexphp/following{/other_user}","gists_url":"https://api.github.com/users/silexphp/gists{/gist_id}","starred_url":"https://api.github.com/users/silexphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silexphp/subscriptions","organizations_url":"https://api.github.com/users/silexphp/orgs","repos_url":"https://api.github.com/users/silexphp/repos","events_url":"https://api.github.com/users/silexphp/events{/privacy}","received_events_url":"https://api.github.com/users/silexphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silexphp/Silex","description":"The PHP micro-framework based on the Symfony2 Components ","fork":false,"url":"https://api.github.com/repos/silexphp/Silex","forks_url":"https://api.github.com/repos/silexphp/Silex/forks","keys_url":"https://api.github.com/repos/silexphp/Silex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silexphp/Silex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silexphp/Silex/teams","hooks_url":"https://api.github.com/repos/silexphp/Silex/hooks","issue_events_url":"https://api.github.com/repos/silexphp/Silex/issues/events{/number}","events_url":"https://api.github.com/repos/silexphp/Silex/events","assignees_url":"https://api.github.com/repos/silexphp/Silex/assignees{/user}","branches_url":"https://api.github.com/repos/silexphp/Silex/branches{/branch}","tags_url":"https://api.github.com/repos/silexphp/Silex/tags","blobs_url":"https://api.github.com/repos/silexphp/Silex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silexphp/Silex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silexphp/Silex/git/refs{/sha}","trees_url":"https://api.github.com/repos/silexphp/Silex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silexphp/Silex/statuses/{sha}","languages_url":"https://api.github.com/repos/silexphp/Silex/languages","stargazers_url":"https://api.github.com/repos/silexphp/Silex/stargazers","contributors_url":"https://api.github.com/repos/silexphp/Silex/contributors","subscribers_url":"https://api.github.com/repos/silexphp/Silex/subscribers","subscription_url":"https://api.github.com/repos/silexphp/Silex/subscription","commits_url":"https://api.github.com/repos/silexphp/Silex/commits{/sha}","git_commits_url":"https://api.github.com/repos/silexphp/Silex/git/commits{/sha}","comments_url":"https://api.github.com/repos/silexphp/Silex/comments{/number}","issue_comment_url":"https://api.github.com/repos/silexphp/Silex/issues/comments{/number}","contents_url":"https://api.github.com/repos/silexphp/Silex/contents/{+path}","compare_url":"https://api.github.com/repos/silexphp/Silex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silexphp/Silex/merges","archive_url":"https://api.github.com/repos/silexphp/Silex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silexphp/Silex/downloads","issues_url":"https://api.github.com/repos/silexphp/Silex/issues{/number}","pulls_url":"https://api.github.com/repos/silexphp/Silex/pulls{/number}","milestones_url":"https://api.github.com/repos/silexphp/Silex/milestones{/number}","notifications_url":"https://api.github.com/repos/silexphp/Silex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silexphp/Silex/labels{/name}","releases_url":"https://api.github.com/repos/silexphp/Silex/releases{/id}","created_at":"2010-09-16T09:47:20Z","updated_at":"2015-03-06T09:56:02Z","pushed_at":"2015-03-06T07:17:08Z","git_url":"git://github.com/silexphp/Silex.git","ssh_url":"git@github.com:silexphp/Silex.git","clone_url":"https://github.com/silexphp/Silex.git","svn_url":"https://github.com/silexphp/Silex","homepage":"silex.sensiolabs.org","size":7843,"stargazers_count":2578,"watchers_count":2578,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":541,"mirror_url":null,"open_issues_count":72,"forks":541,"open_issues":72,"watchers":2578,"default_branch":"1.2"}},"_links":{"self":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/918"},"html":{"href":"https://github.com/silexphp/Silex/pull/918"},"issue":{"href":"https://api.github.com/repos/silexphp/Silex/issues/918"},"comments":{"href":"https://api.github.com/repos/silexphp/Silex/issues/918/comments"},"review_comments":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/918/comments"},"review_comment":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/918/commits"},"statuses":{"href":"https://api.github.com/repos/silexphp/Silex/statuses/aa2e3bb149877988d45147651e5fd24e3a358695"}}}}