我正在使用Symfony2进行项目,我想使用Google / Facebook / Twitter进行连接。所以我安装了HWIOAuthBundle,但是当我更新我的composer.json
时出现了这个错误"子节点" firewall_name"在路径" hwi_oauth"一定是 构造"
谢谢你的帮助!
答案 0 :(得分:1)
是的,如果您阅读了文档:
(它给出了配置......)
Step 2: Configuring resource owners
HWIOAuthBundle为您的每个资源所有者创建专用服务 想在你的应用程序中使用。将使用这些资源所有者 oauth防火墙。该捆绑包提供了几个预先配置的资源 只需要一点配置的所有者。
要使此捆绑包正常工作,您需要将以下内容添加到您的帐户中 应用程序/配置/ config.yml:
的应用程序/配置/ 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