Janrain的PHP-OpenID和Google/Yahoo [英] Janrain's PHP-OpenID and Google/Yahoo

查看:68
本文介绍了Janrain的PHP-OpenID和Google/Yahoo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Janrain的PHP-OpenID 2.1.3 ,设法使其与我尝试过的所有提供商(除了Google和Yahoo)合作.此处的主要区别似乎是,与大多数其他提供商不同,Google和Yahoo并不使用特定于用户的URL,而是最终使用了用户发现框架-它将默认的Janrain框架抛出循环,然后尝试开始身份验证请求.

I'm using Janrain's PHP-OpenID 2.1.3, and I've managed to get it working with all the providers I have tried except for Google and Yahoo. The major difference here seems to be that Google and Yahoo, unlike most other providers, don't use a user-specific URL, but rather have the user discovery framework all on their end - which throws the default Janrain framework for a loop then it tries to begin the auth request.

从我所看到的情况来看,看起来好像是YADIS发现引发了错误,由于该发现是在Google或Yahoo的末尾,应该可以绕开它,但是我不确定.对我来说,这是一次很大的非正式学习经历,而且我还没有运气找到可以帮助我解决这一问题的文档.任何提示将不胜感激.

From what I've seen it looks like it's probably the YADIS discovery that is throwing the error, which should be able to be bypassed since the discovery is on Google or Yahoo's end, but I'm not sure. This is all a big informal learning experience for me, and I haven't had any luck finding documentation that can help me on this one. Any tips would be greatly appreciated.

编辑:我遇到的具体问题是,当为Google或Yahoo URL调用begin()函数时,我得到一个空返回值.可以在Auth/OpenID/Consumer.php中找到此功能以供参考.

the specific problem I am having is that when the begin() function is called for the Google or Yahoo URL, I get a null return. This function is found in Auth/OpenID/Consumer.php for reference.

推荐答案

好,我终于修复了该库...我解释了所有内容

Ok, I finally got to fix the library... I explained everything here (you can also download the php-openid library after my changes).

我需要执行Paul Tarjan的建议,但是,我还需要修改Auth_OpenID_detectMathLibrary并将static关键字添加到许多功能中.之后,尽管它不是理想的解决方案,但它似乎可以正常工作...我认为应该用PHP 5重写整个库...

I needed to do what Paul Tarjan suggested but, also, I needed to modify the Auth_OpenID_detectMathLibrary and add the static keyword to a lot of functions. After that It seems to work perfectly although it is not an ideal solution... I think that someone should rewrite the whole library in PHP 5...

这篇关于Janrain的PHP-OpenID和Google/Yahoo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆