security:
    providers:
        cadoles_core_db_provider:
            entity:
                class: CadolesCoreBundle:User
                property: username
                                    
    encoders:
        Cadoles\CoreBundle\Entity\User: 
            id: cadoles.core.password.encoder
        Cadoles\CoreBundle\Entity\Registration:
            id: cadoles.core.password.encoder
        
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

        main:
            provider: cadoles_core_db_provider
            anonymous: ~

            form_login:
                login_path: cadoles_core_login
                check_path: cadoles_core_login
                use_referer: true
                target_path_parameter: cadoles_core_home
                csrf_parameter: _csrf_security_token
                csrf_token_id: a_private_string
            
            logout:
                invalidate_session: true
                path: cadoles_core_kill
                target: cadoles_core_home
            
            light_saml_sp:
                provider: cadoles_core_db_provider
                user_creator: cadoles.saml_user_creator
                username_mapper: cadoles.saml_user_mapper
                login_path: /saml/login
                check_path: /saml/acs
            
    access_control:
            - { path: ^/websocket, roles: [ROLE_ADMIN, ROLE_MODO, ROLE_ANIM, ROLE_USER] }
            - { path: ^/user, roles: [ROLE_ADMIN, ROLE_MODO, ROLE_ANIM, ROLE_USER] }
            - { path: ^/config, roles: [ROLE_ADMIN, ROLE_MODO] }
                    
