title: Logout from http_basic auth in Symfony2
body: <p>Whenever I go to <code>/admin/logout</code>, I'm correctly redirected to the root of my project but still logged in when I visit <code>/admin/</code> as I'm not prompted for credentials.</p>
  
  <p>Here is my configuration:</p>
  
  <p><strong>security.yml</strong></p>
  
  <pre><code>security:
      firewalls:
          admin_area:
              pattern:    ^/admin
              http_basic: ~
              stateless:  true
              switch_user: { role: ROLE_SUPER_ADMIN, parameter: _want_to_be_this_user }
              logout: { path: /admin/logout, target: / }
  </code></pre>
  
  <p><strong>AdminBundle/Resources/config/routing.yml</strong></p>
  
  <pre><code>logout:
      pattern:   /logout
  </code></pre>
  
  <p><strong>app/config/routing.yml</strong></p>
  
  <pre><code>admin:
      resource: "@AdminBundle/Resources/config/routing.yml"
      prefix:   /admin
  </code></pre>
  
  <p>The authorization is still in place as the headers state <code>Authorization:Basic YWRtaW46cEAkJHcwUmQh</code> so I guess credentials are still provided to the application during the request.</p>
  
  <p>I know there is no proper way to logout from a <code>HTTP Basic Auth</code> as per <a href="https://stackoverflow.com/questions/233507/how-to-log-out-user-from-web-site-using-basic-authentication">this question</a> but maybe Symfony2 allows it?</p>