5

I am testing Security environnement within Symfony2 and hav problem with log out process

Here is my security.yml file

security:
firewalls:
    secured_area:
            pattern:    ^/
            anonymous: ~
            switch_user: true
            logout: 
                path: /logout
                target: /
            http_basic:
                realm: "Secured Demo Area"

access_control:
    - { path: ^/item, roles: [ 'ROLE_USER' ]  }

providers:
    in_memory:
        users:
            collector:  { password: collector, roles: 'ROLE_USER' }
            admin: { password: admin, roles: 'ROLE_ADMIN' }

encoders:
    Symfony\Component\Security\Core\User\User: plaintext

Problem is that when I go to mysite.site/app_dev.php/logout it does redirect me to "target" but does not log out active user.

Does anyone know where am i wrong ?

Elnur Abdurrakhimov
  • 44,533
  • 10
  • 148
  • 133
Matthieu
  • 1,084
  • 12
  • 23

1 Answers1

6

Since you are using HTTP authentication, the reason might be that your browser caches your credentials and relogins automatically. Try using HTML form authentication and see if the problem persists.

Elnur Abdurrakhimov
  • 44,533
  • 10
  • 148
  • 133
  • I guess this is still relevant? No idea how to fix this *without* having to create forms, validations, routs, all that stupid stuff? – Andrey Popov Jan 29 '15 at 14:36