错误security.firewalls.access_control symfony

问题描述

你好,我有这个错误

“ security.firewalls.access_control”下的无法识别的选项“ 0、1”。 可用选项为“ access_denied_handler”,“ access_denied_url”, “匿名”,“上下文”,“ custom_authenticators”,“ entry_point”, “ form_login”,“ form_login_ldap”,“ guard”,“ host”,“ http_basic”, “ http_basic_ldap”,“ json_login”,“ json_login_ldap”,“懒惰”, “ lexik_jwt”,“注销”,“方法”,“模式”,“提供者”, “ remember_me”,“ remote_user”,“ request_matcher”,“ security”, “无状态”,“ switch_user”,“ user_checker”,“ x509”。

有人知道我需要在哪里修改一些东西来解决错误吗?

有关信息,我查看文件security.yaml:

security:
    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
    providers:
        users:
            entity:
                # the class of the entity that represents users
                class: 'App\Entity\Customer'
                # property: customername
    # added by me for configure security bundle
    enable_authenticator_manager: true
    encoders:
        # use your user class name here
        App\Entity\Customer:
            # Use native password encoder
            # This value auto-selects the best possible hashing algorithm
            # (i.e. sodium when available).
            algorithm: auto
    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
            guard:
                authenticators:
                    - lexik_jwt_authentication.jwt_token_authenticator
        access_control:
            - { path: ^/api/login,roles: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: ^/api,roles: IS_AUTHENTICATED_FULLY }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)