我打算将我的网络项目(基于 symfony2 PR5)改编为 symfony2 PR7。除了安全包之外,此迁移的一切都非常清楚。这是我的安全配置:
security:
encoders:
Application\PermissionsBundle\Entity\Stuff: sha1
providers:
main:
entity: { class: PermissionsBundle:Stuff, property: username}
firewalls:
main:
pattern: .*
form_login:
check_path: /login-check-admin
login_path: /login-admin
failure_path: /login-admin
logout: true
anonymous: true
backend:
pattern: /admin.*
form_login:
check_path: /login-check-admin
login_path: /login-admin
logout: true
security: true
anonymous: false
access_control:
- { path: /admin.*, role: ROLE_ADMIN }
路由配置:
_security_login:
pattern: /login-admin
defaults: { _controller: PermissionsBundle:Security:login }
_security_check:
pattern: /login-check-admin
_security_logout:
pattern: /logout-admin
_security_status:
pattern: /sec_status
defaults: { _controller: PermissionsBundle:Security:status }
_security_get_username:
pattern: /security/get/username
defaults: { _controller: PermissionsBundle:Security:getUserName }
当我尝试进行身份验证时,我得到一个 404 fpr 登录检查: Firebug 输出:http: //impic.ru/uploads/2011/2303/53849205_61601933.jpeg
有人可以帮我解决这个问题吗?这段代码在 PR5 中运行良好,但在 PR7 中不行。官方的 symfony 文档还没有改变。也许我错过了什么?