security:
    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
    providers:
        webservice:
              id: Mobicoop\Bundle\MobicoopBundle\User\Service\UserProvider
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            anonymous: true
            guard:
                authenticators:
                    - Mobicoop\Bundle\MobicoopBundle\User\Security\TokenAuthenticator
            # https://symfony.com/doc/current/security/form_login_setup.html
            logout:
                path: /user/logout
                target: /
                success_handler : mobicoop_bundle_mobicoop.listener.logoutListener
            access_denied_handler: mobicoop_bundle_mobicoop.security.access_denied_handler

    # 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: ^/admin, roles: ROLE_ADMIN }
        # - { path: ^/profile, roles: ROLE_USER }
    encoders:
        Mobicoop\Bundle\MobicoopBundle\User\Entity\User:
            algorithm: auto
