如何解决错误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:
# 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 举报,一经查实,本站将立刻删除。