security:
    role_hierarchy:
        ROLE_TENANT_CUISINIER: [ROLE_TENANT_USER]
        ROLE_TENANT_GESTIONNAIRE: [ROLE_TENANT_CUISINIER]
        ROLE_TENANT_ADMIN: [ROLE_TENANT_GESTIONNAIRE]

    password_hashers:
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: "auto"

    providers:
        tenant_user_provider:
            id: App\Security\TenantUserProvider

    firewalls:
        dev:
            pattern: ^/(_profiler|_wdt|assets|build)/
            security: false
        tenant:
            pattern: ^/app
            lazy: true
            provider: tenant_user_provider
            custom_authenticator: App\Security\TenantAuthenticator
            login_throttling:
                max_attempts: 5
                interval: "15 minutes"
            remember_me:
                secret: "%kernel.secret%"
                lifetime: 604800
            logout:
                path: tenant_logout
                target: tenant_login

    access_control:
        - { path: ^/app/dev/switch, roles: PUBLIC_ACCESS }
        - { path: ^/app/login, roles: PUBLIC_ACCESS }
        - { path: ^/app, roles: ROLE_TENANT_USER }

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