Symfony2 exit issue

I am testing a security environment in Symfony2 and a hav logout issue

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

The problem is that when I go to mysite.site/app_dev.php/logout, it redirects me to the "target", but does not give out the active user.

Does anyone know where I am wrong?

+5
source share
1 answer

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

+6
source

All Articles