本文介绍了Symfony HWIOAuthBundle,如何配置cURL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发机器上,我们有apache附带的默认证书,当我们尝试使用Facebook进行身份验证时,触发异常:

On the development machine we have the default certificates that comes with apache, when we trying to authenticate with facebook, HWIOAuthBundle fires an exception:

很明显,在纯PHP中,我们需要设置一个选项 CURLOPT_SSL_VERIFYPEER = false ,并传递给 curl_setopt_array(...)

It's clear that in plain PHP we need to set an option CURLOPT_SSL_VERIFYPEER = false, and pass to curl_setopt_array(...).

如何为Symfony或?

How can we define these options for Symfony or for HWIOAuthBundle?

推荐答案

在hwi_oauth下添加以下选项,您应该就可以了。

Add following options under "hwi_oauth" and you should be fine.

hwi_oauth:
    http_client:
        verify_peer: false

这篇关于Symfony HWIOAuthBundle,如何配置cURL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 21:11