我正在按照本教程Custom Password Authenticator进行操作,但在尝试实现简单表单时得到以下错误:
InvalidConfigurationException: Unrecognized options "simple_form" under "security.firewalls.main"这是我的security.yml
security:
encoders:
GigCapitol/MasterBundle/Entity/User: plaintext
role_hierarchy:
ROLE_USER: ROLE_USER
ROLE_ADMIN: ROLE_ADMIN
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
users:
entity: { class: GigCapitolMasterBundle:User, property: username }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
anonymous: ~
provider: users
simple-form:
authenticator: MasterAuthenticator
login_path: master_index
check_path: master_login_check
access_control:
- { path: /, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/, roles: IS_AUTHENTICATED_FULLY }
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }这里的问题似乎是什么?
发布于 2014-01-25 20:51:46
看起来正确的键是"simple_form",而你有"simple-form“。
发布于 2014-01-28 15:56:46
我似乎有2.0左右的版本,simple_form是在2.2中实现的
https://stackoverflow.com/questions/21350684
复制相似问题