security:
    password_hashers:
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'

    providers:
        app_user_provider:
            entity:
                class: App\Entity\User
                property: email

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

        main:
            lazy: true
            provider: app_user_provider

            form_login:
                login_path: app_login
                check_path: app_login
                enable_csrf: true
                default_target_path: app_dashboard

            remember_me:
                secret: '%kernel.secret%'
                lifetime: 604800 # 7 jours

            logout:
                path: app_logout
                target: app_login

    access_control:
        - { path: ^/connexion, roles: PUBLIC_ACCESS }
        - { path: ^/assets/, roles: PUBLIC_ACCESS }
        - { path: ^/, roles: ROLE_USER }
