security:
    password_hashers:
        App\User\Entity\User: 'auto'

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

    firewalls:
        dev:
            pattern: ^/(_profiler|_wdt|assets|build)/
            security: false
        main:
            lazy: true
            provider: app_user_provider
            form_login:
                login_path: auth.login
                check_path: auth.login
                default_target_path: front.home
                enable_csrf: true
            logout:
                path: auth.logout
                target: auth.login
            remember_me:
                secret: '%kernel.secret%'
                lifetime: 604800

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

when@test:
    security:
        password_hashers:
            Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
                algorithm: auto
                cost: 4
                time_cost: 3
                memory_cost: 10
