security:
    enable_authenticator_manager: true
    # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
    password_hashers:
        App\Services\Security\WebUser: 
            algorithm: bcrypt
            cost: 12
    # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
    providers:
        App\Services\Security\UserProvider:
            id: App\Services\Security\UserProvider
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        app_provider:
            pattern: /.*
            form_login:
                login_path: /login
                check_path: /login_check
                provider: App\Services\Security\UserProvider
                failure_handler: app.auth.handler
                success_handler: app.auth.handler

            logout:
                path: /logout
                target: /login
            access_denied_handler: app.access.denied.controller
            # activate different ways to authenticate
            # https://symfony.com/doc/current/security.html#the-firewall

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

    # 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: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/login_check, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/error/403, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/*, roles: IS_AUTHENTICATED_REMEMBERED }        
        # - { path: ^/admin, roles: ROLE_ADMIN }
        # - { path: ^/profile, roles: ROLE_USER }
