security:
    encoders:
        Symfony\Component\Security\Core\User\User:
            algorithm: auto
    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
    providers:
        backoffice_user_provider:
            memory:
                users:
                    supervision:
                        password: '$argon2id$v=19$m=65536,t=4,p=1$mEynFi2aqjX59HgBVPiYFw$uKdBfnCU4T+8rndee6WUUYR6zNPi+YXMxaMbHpeYs9g'
                        roles: 'ROLE_ADMIN'
                    kitchen:
                        password: '$argon2id$v=19$m=65536,t=4,p=1$GvOA0p4wDtKgUJIjl7Y6YQ$8DXAe7VDKDBrWR6kDKRxSHVXGRdTPBA14wWCBPZiDTA'
                        roles: 'ROLE_KITCHEN'
    firewalls:
        login:
            pattern:  ^/api/login
            stateless: true
            anonymous: true
            json_login:
                check_path:               /api/login_check
                success_handler:          lexik_jwt_authentication.handler.authentication_success
                failure_handler:          lexik_jwt_authentication.handler.authentication_failure
        api:
            pattern:   ^/api
            stateless: true
            anonymous: true
            guard:
                authenticators:
                    - lexik_jwt_authentication.jwt_token_authenticator
        main:
            anonymous: 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: ^/api/matrice, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https}
#        - { path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https}
#        - { path: ^/api/orders, methods: [GET, PUT, DELETE], roles: IS_AUTHENTICATED_FULLY, requires_channel: https}
#        - { path: ^/api/kitchen-orders, roles: IS_AUTHENTICATED_FULLY, requires_channel: https}
