{"action":"closed","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/15294","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/15294/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/15294/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/15294/events","html_url":"https://github.com/symfony/symfony/issues/15294","id":95427022,"number":15294,"title":"[DX][Security] Introduce a class representing a/the current firewall","user":{"login":"ghost","id":10137,"avatar_url":"https://avatars.githubusercontent.com/u/10137?v=3","gravatar_id":"","url":"https://api.github.com/users/ghost","html_url":"https://github.com/ghost","followers_url":"https://api.github.com/users/ghost/followers","following_url":"https://api.github.com/users/ghost/following{/other_user}","gists_url":"https://api.github.com/users/ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghost/subscriptions","organizations_url":"https://api.github.com/users/ghost/orgs","repos_url":"https://api.github.com/users/ghost/repos","events_url":"https://api.github.com/users/ghost/events{/privacy}","received_events_url":"https://api.github.com/users/ghost/received_events","type":"User","site_admin":false},"labels":[{"id":107512439,"url":"https://api.github.com/repos/symfony/symfony/labels/DX","name":"DX","color":"5319e7","default":false},{"id":100084,"url":"https://api.github.com/repos/symfony/symfony/labels/Enhancement","name":"Enhancement","color":"02d7e1","default":false},{"id":99600,"url":"https://api.github.com/repos/symfony/symfony/labels/Security","name":"Security","color":"DDDDDD","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-07-16T12:53:37Z","updated_at":"2016-11-02T22:52:49Z","closed_at":"2016-11-02T22:52:49Z","body":"This issue came up: https://github.com/symfony/symfony/issues/11134#issuecomment-110008899, https://github.com/symfony/symfony/issues/14435#issuecomment-110004138, https://github.com/scheb/two-factor-bundle/issues/13#issuecomment-104435069\n\nAs of Symfony 2.6 we have `Symfony\\Component\\Security\\Http\\Firewall` which is actually a listener and `Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext`. But we don't have a class / inteface representing a Firewall.\n\nWe're currently introducing a two-factor auth scheme for parts of our application which is covered by a special firewall. Therefor we need to access the current firewall and the \"regular\" firewall and get information from it.\n\nThere might be more use cases where one wants to retrieve informations about the current or another firewall, so a class to represent firewalls and a method to retrieve those classes would be helpful:\n\n``` php\ninterface Firewall\n{\n  function getKey();\n  function getContext();\n  function getRequestMatcher():\n  function getProvider();\n  /**\n   * This function can be used to lookup firewall configuration\n   * values that are not exposed with more specific methods.\n   * @return array map of the firewall configuration\n   */\n  function getConfig();\n}\n```\n"}}
{"actor":{"display_login":"fabpot"}}