必须配置路径 "hwi_oauth" 处的子节点 "firewall_name"

The child node "firewall_name" at path "hwi_oauth" must be configured

我正在用 Symfony2 做一个项目,我想使用 Google/Facebook/Twitter 进行连接。所以我安装了 HWIOAuthBundle,但是当我更新 composer.json

时出现了这个错误

"The child node "firewall_name" at path "hwi_oauth" must be configured.".

感谢您的帮助!

是的,如果您阅读文档:

(它给出了配置...)

Step 2: Configuring resource owners

HWIOAuthBundle creates a dedicated service for each resource owner you want to use in your application. These resource owners will be used in the oauth firewall. The bundle ships several pre-configured resource owners that need only a little configuration.

To make this bundle work you need to add the following to your app/config/config.yml:

app/config/config.yml

hwi_oauth:
    # name of the firewall in which this bundle is active, this setting MUST be set
    firewall_name: secured_area

    # an optional setting to configure a query string parameter which can be used to redirect
    # the user after authentication, e.g. /connect/facebook?_destination=/my/destination will
    # redirect the user to /my/destination after facebook authenticates them.  If this is not
    # set then the user will be redirected to the original resource that they requested, or
    # the base address if no resource was requested.  This is similar to the behaviour of
    # [target_path_parameter for form login](http://symfony.com/doc/2.0/cookbook/security/form_login.html).
    # target_path_parameter: _destination