security:
    password_hashers:
        App\Entity\Utilisateur:
            algorithm: bcrypt

    providers:
        db_provider:
            entity:
                class: App\Entity\Utilisateur
                property: username

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

        main:
            provider: db_provider
            form_login:
                enable_csrf: false  # Important for security
                login_path: login  # Your existing route name
                check_path: login  # Your existing route name
            logout:
                path: /logout
                target: /

    access_control:
        - { path: ^/login, roles: PUBLIC_ACCESS }
        - { path: ^/storefront, roles: PUBLIC_ACCESS }
        - { path: ^/, roles: ROLE_ADMIN }

    # Required for Symfony 5.3+
    enable_authenticator_manager: true