security:
    encoders:
        App\Entity\HotelUser:
            algorithm: auto

    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
    providers:
        # used to reload user from session & other features (e.g. switch_user)
        app_user_provider:
            entity:
                class: App\Entity\HotelUser
                property: email
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            anonymous: true
            lazy: true
            provider: app_user_provider

            json_login:
                check_path: app_login
                username_path: email
                password_path: password 

            logout:
                path: app_logout
            guard:
                authenticators:
                    - App\Security\ApiTokenAuthenticator 

            # 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: ^/admin, roles: ROLE_ADMIN }
        # - { path: ^/profile, roles: ROLE_USER }
        #- { path: ^/api, roles: ROLE_ADMIN }
        # - { path: ^/api/hotels, roles: ROLE_ADMIN }
        # - { path: ^/api/activities, roles: ROLE_ADMIN }
        # - { path: ^/api/confidence_concepts, roles: ROLE_ADMIN }
        # - { path: ^/api/confidence_indexes, roles: ROLE_ADMIN }
        # - { path: ^/api/countries, roles: ROLE_ADMIN }
        # - { path: ^/api/customer_profiles, roles: ROLE_ADMIN }
        # - { path: ^/api/customer_users, roles: ROLE_ADMIN }
        # - { path: ^/api/documents, roles: ROLE_ADMIN }
        # - { path: ^/api/hotels, roles: ROLE_ADMIN }
        # - { path: ^/api/hotel_days, roles: ROLE_ADMIN }
        # - { path: ^/api/hotel_features, roles: ROLE_ADMIN }
        # - { path: ^/api/hotel_tones, roles: ROLE_ADMIN }
        # - { path: ^/api/hotel_users, roles: ROLE_ADMIN }
        # - { path: ^/api/images, roles: ROLE_ADMIN }
        # - { path: ^/api/included_features, roles: ROLE_ADMIN }
        # - { path: ^/api/informations, roles: ROLE_ADMIN }
        # - { path: ^/api/packs, roles: ROLE_ADMIN }
        # - { path: ^/api/payment_methods, roles: ROLE_ADMIN }
        # - { path: ^/api/pets, roles: ROLE_ADMIN }
        # - { path: ^/api/place_order_ones, roles: ROLE_ADMIN }
        # - { path: ^/api/plae_order_twos, roles: ROLE_ADMIN }
        # - { path: ^/api/place_types, roles: ROLE_ADMIN }
        # - { path: ^/api/qualifications, roles: ROLE_ADMIN }
        # - { path: ^/api/reservations, roles: ROLE_ADMIN }
        # - { path: ^/api/rooms, roles: ROLE_ADMIN }
        # - { path: ^/api/room_categories, roles: ROLE_ADMIN }
        # - { path: ^/api/room_features, roles: ROLE_ADMIN }
        # - { path: ^/api/room_levels, roles: ROLE_ADMIN }
        # - { path: ^/api/spaces, roles: ROLE_ADMIN }
        # - { path: ^/api/spaces_priority_criteria, roles: ROLE_ADMIN }
        # - { path: ^/api/space_states, roles: ROLE_ADMIN }
        # - { path: ^/api/towns, roles: ROLE_ADMIN }
        # - { path: ^/api/withdraws, roles: ROLE_ADMIN }
        # - { path: ^/api/zip_codes, roles: ROLE_ADMIN }
        # - { path: ^/api/zones, roles: ROLE_ADMIN }
