【发布时间】:2018-04-11 21:51:27
【问题描述】:
转到http://localhost/app_dev.php/login/facebook后出现这个错误:
[1/2] RequestException: Failed to connect to localhost port 1080: Connection refused -
in vendor/kriswallsmith/buzz/lib/Buzz/Client/Curl.php at line 29
Uncaught PHP Exception HWI\Bundle\OAuthBundle\OAuth\Exception\HttpTransportException: "Error while sending HTTP request" at /var/www/symfony/vendor/hwi/oauth-bundle/OAuth/ResourceOwner/AbstractResourceOwner.php line 256 Context: { "exception": "Object(HWI\\Bundle\\OAuthBundle\\OAuth\\Exception\\HttpTransportException)" }
我的 config_dev.php:
# HWIOAuthBundle
hwi_oauth:
connect:
account_connector: hwi_oauth.user.provider.entity
firewall_names: [secured_area]
resource_owners:
facebook:
type: facebook
client_id: ...
client_secret: ...
options:
display: popup #dialog is optimized for popup window
auth_type: rerequest
fosub:
username_iterations: 30
properties:
facebook: facebookId
我的 security.yml : ...
providers:
fos_userbundle:
id: fos_user.user_provider.username
firewalls:
secured_area:
anonymous: ~
oauth:
resource_owners:
facebook: "/login/check-facebook"
login_path: /login
failure_path: /login
oauth_user_provider:
service: hwi_oauth.user.provider.entity
有关信息,我使用 Symfony3。
感谢您的帮助:)
【问题讨论】:
-
当我查看 this site 时,在显示文档的底部部分,它说在低于 3.0 的 Symfony 上受支持。
标签: php oauth symfony hwioauthbundle