【问题标题】:The child node "firewall_name" at path "hwi_oauth" must be configured必须配置路径“hwi_oauth”处的子节点“firewall_name”
【发布时间】:2015-03-02 00:29:28
【问题描述】:

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

“路径“hwi_oauth”的子节点“firewall_name”必须是 已配置。”。

感谢您的帮助!

【问题讨论】:

    标签: symfony hwioauthbundle


    【解决方案1】:

    是的,如果您阅读了文档:

    (它给出了配置...)

    Step 2: Configuring resource owners

    HWIOAuthBundle 为您的每个资源所有者创建一个专用服务 想在您的应用程序中使用。这些资源所有者将用于 oauth 防火墙。该捆绑包附带了几个预先配置的资源 只需要一点配置的所有者。

    要使此捆绑包正常工作,您需要将以下内容添加到您的 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  
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-12-05
      • 1970-01-01
      • 2018-08-08
      • 1970-01-01
      • 2016-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多