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

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

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

        main:
            lazy: true
            provider: app_user_provider
            custom_authenticators:
                - App\Security\LoginFormAuthenticator
            entry_point: App\Security\LoginFormAuthenticator
            remember_me:
                secret: '%env(APP_SECRET)%'
                lifetime: 604800

            logout:
                path: app_logout

    access_control:
        - { path: ^/login$, roles: PUBLIC_ACCESS }
        - { path: ^/logout$, roles: PUBLIC_ACCESS }
        - { path: ^/register$, roles: PUBLIC_ACCESS }
        - { path: ^/onboarding$, roles: PUBLIC_ACCESS }
        - { path: ^/onboarding, roles: IS_AUTHENTICATED_FULLY }
        - { path: ^/portal, roles: ROLE_CLIENT }
        - { path: ^/users, roles: ROLE_USER }
        - { path: ^/profile$, roles: ROLE_USER }
        - { path: ^/, roles: ROLE_USER }

when@test:
    security:
        password_hashers:
            App\Entity\User:
                algorithm: auto
                cost: 4
                time_cost: 3
                memory_cost: 10
