This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Configuration file security.yml

This is for discussion, mainly on 1.x but there's some 2.x topics here too.

Configuration file security.yml

by robergeflo31 » Wed Feb 05, 2014 7:16 pm

Hello,

I have configured my secuity.yml like that :
Code: Select all
security:
    encoders:
        Symfony\Component\Security\Core\User\User: plaintext
 
    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
 
    providers:
        in_memory:
            memory:
                users:
                    admin: { password: pass, roles: [ 'ROLE_ADMIN' ] }
 
    firewalls:       
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
           
        main:
            pattern: ^/
            anonymous: ~
            provider: in_memory
            form_login:
                check_path: login_check
                login_path: login
                always_use_default_target_path: true
                default_target_path: /
                use_referer: false
            logout:
                path:   logout
                target: /
            #http_basic:
            #    realm: "Secured Demo Area"
           
    access_control:
        - { path: ^/admin, roles: ROLE_ADMIN}


and my app/config/routing.yml like that :
Code: Select all
blogger_blog:
    resource: "@BloggerBlogBundle/Resources/config/routing.yml"
    prefix:   /

blogger_blog_login:
    pattern: /login
    defaults: {_controller: BloggerBlogBundle:Security:login }
    requirements:
        _method: GET
       
blogger_blog_login_check:
    pattern: /login_check
   
blogger_blog_logout:
    pattern: /logout


but i have this error : Unable to find the controller for path "/login_check". Maybe you forgot to add the matching route in your routing configuration?
I don't undertand because the route /login_check is behind the firewall.

Someone can help me ?
robergeflo31
Junior Member
 
Posts: 1
Joined: Wed Feb 05, 2014 7:10 pm