security:
    providers:
        app_user_provider:
            entity:
                class: App\Entity\User
                property: email

    firewalls:
        dev:
            pattern: ^/(_profiler|_wdt|assets|build)/
            security: false
        main:
            lazy: true
            provider: app_user_provider
            custom_authenticators:
                - App\Security\OtpAuthenticator
            entry_point: App\Security\OtpAuthenticator
            access_denied_handler: App\Security\AccessDeniedHandler
            logout:
                path: app_logout
                target: app_login
                enable_csrf: true

    access_control:
        - { path: ^/auth/login, roles: PUBLIC_ACCESS }
        - { path: ^/auth/license, roles: PUBLIC_ACCESS }
        - { path: ^/auth/request-license, roles: PUBLIC_ACCESS }
        - { path: ^/public/, roles: PUBLIC_ACCESS }
        - { path: ^/hub/admin, roles: ROLE_PROFESSIONAL }
        - { 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
