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

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

    firewalls:
        dev:
            pattern: ^/(_profiler|_wdt|assets|build)/
            security: false

        admin:
            pattern: ^/admin
            provider: admin_provider
            form_login:
                login_path: admin_login
                check_path: admin_login
                default_target_path: admin_tarifs
                username_parameter: _username
                password_parameter: _password
            logout:
                path: admin_logout
                target: admin_login
            login_throttling:
                max_attempts: 5
                interval: '10 minutes'

        main:
            lazy: true

    access_control:
        - { path: ^/admin/login,          roles: PUBLIC_ACCESS }
        - { path: ^/admin/forgot-password, roles: PUBLIC_ACCESS }
        - { path: ^/admin/reset-password,  roles: PUBLIC_ACCESS }
        - { path: ^/admin,                 roles: ROLE_ADMIN }

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