security:
    encoders:
        SmartUserBundle\Model\UserInterface: bcrypt

    role_hierarchy:
        ROLE_ADMIN: ROLE_USER
        ROLE_SUPER_ADMIN: ROLE_ADMIN

    providers:
        smart_user_bundle:
            id: SmartUserBundle\Security\User\UsernameEmailProvider

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            pattern: ^/
            form_login:
                provider: smart_user_bundle
                csrf_token_generator: security.csrf.token_manager
            logout:
                target: /login
            anonymous: true
            switch_user: true
            remember_me:
                secret: '%env(APP_SECRET)%'
                lifetime: 86400
                path: /

    access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/liste-des-formations, role: IS_AUTHENTICATED_REMEMBERED }
        - { path: ^/statistiques-regional, role: IS_AUTHENTICATED_REMEMBERED }
        - { path: ^/statistiques-national, role: IS_AUTHENTICATED_REMEMBERED }
        - { path: ^/admin, role: ROLE_ADMIN }
