security:
    enable_authenticator_manager: true
    encoders:
        FindMyDataBundle\Security\Worker:
            algorithm: auto

    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
    providers:
        users_in_memory: { memory: null }
        app_key_user_provider:
            id: FindMyDataBundle\Security\UserProvider
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            lazy: true
            provider: app_key_user_provider
            stateless: false
            guard:
                authenticators:
                    - FindMyDataBundle\Security\LoginFormAuthenticator
                entry_point: FindMyDataBundle\Security\LoginFormAuthenticator
            logout:
                path: main_logout_fr
                # where to redirect after logout
                # target: redirect_home_uk

            # activate different ways to authenticate
            # https://symfony.com/doc/current/security.html#firewalls-authentication

            # https://symfony.com/doc/current/security/impersonating_user.html
            # switch_user: true

    # Easy way to control access for large sections of your site
    # Note: Only the *first* access control that matches will be used
    access_control:
        - { path: ^/se-connecter, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        # - { path: ^/profile, roles: ROLE_USER }
