我下面這個教程Custom Password Authenticator並得到以下錯誤,當我嘗試實現簡單的形式:Symfony2中無法識別的選項「simple_form」下的「security.firewalls.main」
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 }
這似乎是什麼問題?
就開始實施我所知破折號/連字符得到標準化爲強調這麼簡單的形式將最終成爲simple_form,但隨後沒有設置。 – qooplmao
simple_form被添加到2.4版本中。 http://symfony.com/doc/current/cookbook/security/custom_password_authenticator.html –
如何用2.3或更低版本解決這個問題?我正在開發自定義Ldap身份驗證,並且我停在了同一個地方。 –