Hi,

I think you missed the third part of security config: the
access_control list ( Authorization )
http://docs.symfony-reloaded.org/master/guides/security/index.html

try adding this in your config:

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

The way you configured your security means /.* urls are accessible for
all ( security: false ).
Only /admin/.* urls are secured, but you have to tell explicitly to
the security component what kind of authorization is able to see these
urls.
By adding the /admin/.* access_control, you say only users with role
ROLE_ADMIN ( thus authenticated ) can see those resources.


On Nov 9, 5:15 pm, gordonslondon <jules.boussek...@gmail.com> wrote:
> Hi,
>
> After successfully login with the security component, i dump
> $container->get('security.context')->getUser(); wich return null, in
> the debug toolbar the user is still "anon.".
>
> What i've checked:
>  - Nothing interesting in logs.
>  - There's no error message, all went fine.
>  - The user is found and his password is encoded like described in the
> documentation.
>  - After login, i'm redirected to /index.php/ like a successful login
> (but still non logged).
>
> security.config:
>     providers:
>         main:
>             password_encoder: sha1
>             entity: { class: GordBundle:Account, property: email }
>     firewalls:
>         login_check: { pattern: /login_check, security: true,
> anonymous: true, form-login: true }
>         backend:
>             pattern:    /admin/.*
>             form_login: true
>             logout:  true
>         public:
>             pattern:    /.*
>             security: false
>             form_login: true
>
> Normally the user should be logged in, but not.
> Is someone has any idea on why i can't login ?

-- 
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