2016-09-13 93 views
0

我正在尝试使用以下链接集成outlook日历, https://dev.outlook.com/restapi/tutorial/php,我已将我的应用添加到https://apps.dev.microsoft.com。该示例应用程序工作正常,与本地主机重定向URIOutlook日历api重定向uri与虚拟主机,不能正常工作

$redirectUri = 'http://localhost/php-tutorial/authorize.php'; 

但是当我用我的虚拟主机本地URI(http://www.gcal2excel.dev/authorize.php),并在[https://apps.dev.microsoft.com][1]更新重定向URI,重定向工作停止,并显示以下错误:

Array 
(
    [error] => invalid_request 
    [error_description] => The provided value for the input parameter 'redirect_uri' is not valid. The scope 'openid https://outlook.office.com/calendars.read' requires that the request must be sent over a secure connection using SSL. 
) 

为此寻求解决方案,我应该在我的本地虚拟主机中实施SSL证书吗?所以连接将使用SSL?如何为本地虚拟主机做到这一点?

+0

不幸的是只有本地主机使用http。 云上的测试或登台环境如何?我们是否也需要这些envs的ssl证书? –

回答

0

是的。您必须将SSL用于重定向URI。 只有异常是localhost。

+0

感谢您的快速回复,您能否建议如何为重定向URI实施SSL? :) – Ikhtiar

+0

你必须参考你使用的任何Web服务器的文档。 –