I ve创建了一个名为“User”的Bundle。 在一般路线上,我增加了每个用户的用户/用户。 因此,例如,当我确定用户所在地的路线/名单时,真正的道路是。
I m trying to force user to login to use this website, an I m doing this:
security:
firewalls:
login_firewall:
pattern: ^/user/login
anonymous: ~
secured_area:
pattern: ^/
form_login:
login_path: user_login
check_path: user_login_check
default_target_path: /
logout:
path: /user_logout
target: user_login
remember_me:
key: atipics-soft2012
lifetime: 3600
access_control:
- { path: ^/, roles: ROLE_USER }
providers:
users:
entity: { class: MyAppUserBundleEntityUser, property:email }
encoders:
MyAppUserBundleEntityUser: { algorithm: sha512, iterations: 10 }
我错了:
InvalidConfigurationException: Invalid configuration for path "security.firewalls.secured_area": The check_path "user_login_check" for login method "form_login" is not matched by the firewall pattern "^/".
问题是什么?
其中,在航道档案中添加了这条路线。