1

对于我们的应用程序,我们将 Symfony2 与WordpressBundle结合使用。我正在尝试启用 Symfony2 remember_me 功能,但无论我尝试什么,都会导致以下错误:

RuntimeException: You must configure at least one remember-me aware listener (such as form-login) for each firewall that has remember-me enabled.

security.yml 中的防火墙如下所示,但我仍然收到上述错误。我已经发布了一个问题,其中也包含相关问题。

firewalls:
    dev:
        pattern:  ^/(_(profiler|wdt)|css|images|js)/
        security: false

    main:
        pattern:    ^/
        anonymous:  ~
        remember_me:
            key: "%secret%"
            lifetime: 604800
            always_remember_me: true 
        form_login:
            login_path:       /login
            check_path:       /login_check
            remember_me:      true
        logout:
            path:   /logout
            target: /
        wordpress_cookie: false
        wordpress_form_login:
            remember_me:      true
            remember_me_parameter: _remember_me
4

0 回答 0