Hello,

I have started to do a simple webapp with the new Symfony2(with sandbox version commit 1fc745d). I have added the SecurityBundle for authentication and somehow the logout configuration seems to work in a special way or maybe I don't understand something.

My app/config/config.yml security config looks like this:

security:
    encoders:
        Symfony\Component\Security\Core\User\User: sha1

    providers:
        main:
            users:
                foo: { password: shapw, roles: ROLE_ADMIN }

    firewalls:
        main:
            pattern: /admin.*
            http-basic: true
            logout: true
            stateless: true

    access_control:
        - { path: /admin.*, role: ROLE_ADMIN }

The HTTP-Basic authentication works fine if I call a "/admin" URL in the browser. But if I want to logout with URL "/logout" I receive following error message:

"Unable to find the controller for path "/logout". Maybe you forgot to add the matching route in your routing configuration?"

In the Security-Documentation(http://docs.symfony-reloaded.org/guides/security/authentication.html#logout-users) it says that there should be a listener which can handle the "/logout" request, but somehow this doesn't work for me.

When I change my config.yml to this(adding a logout section with logout set to true), the "/logout" request works:

security:
    encoders:
        Symfony\Component\Security\Core\User\User: sha1

    providers:
        main:
            users:
                foo: { password: shapw, roles: ROLE_ADMIN }

    firewalls:
        main:
            pattern: /admin.*
            http-basic: true
            logout: true
            stateless: true
        logout:
            pattern: /logout
            logout: true

    access_control:
        - { path: /admin.*, role: ROLE_ADMIN }

Why is this so? Or how do I configure a correct logout configuration?

Thanks for your help!

regards,
Oli

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to