security:
    password_hashers:
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
    providers:
        app_user_provider:
            entity:
                class: App\Entity\User
                property: id
    firewalls:
        main:
            lazy: true
            provider: app_user_provider
            entry_point: App\Security\OAuthAuthenticator
            logout:
                target: /
            custom_authenticators:
                - App\Security\OAuthAuthenticator
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

    access_control:
        - { route: app_connect_keycloak, roles: PUBLIC_ACCESS }
        - { route: admin, roles: [ROLE_ADMIN, ROLE_EDITOR] }
        - { route: app_viewer, roles: PUBLIC_ACCESS }
        - { route: app_get_pdf, roles: PUBLIC_ACCESS }
        - { route: app_shelf_view, roles: PUBLIC_ACCESS }
        - { route: app_preview_pdf, roles: PUBLIC_ACCESS }
          
    role_hierarchy:
        ROLE_EDITOR: ROLE_USER
        ROLE_ADMIN: ROLE_EDITOR

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