本文介绍了PHP SREG中的JanRain OpenID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用修改后的登录名(称为open-id选择器)设置了演示.登录正常,身份URL返回,但是我要求的SREG数据从不填充,不需要或可选.我使用gmail帐户登录到我的页面.这是我编辑的try_auth.php中的代码

I setup the demo with a modified login I found called open-id selector. the login works fine and the identity url comes back, but the SREG data I ask for is never populated, required or optional. I am logging into my page with a gmail account. Here is the code from my try_auth.php that I edited

$sreg_request = Auth_OpenID_SRegRequest::build( // Required array('email'), // Optional array('fullname', 'gender', 'timezone', 'dob', 'country'));

$sreg_request = Auth_OpenID_SRegRequest::build( // Required array('email'), // Optional array('fullname', 'gender', 'timezone', 'dob', 'country'));

给什么?

推荐答案

Google的OpenID身份提供程序不支持SREG.

Google's OpenID identity provider doesn't support SREG.

相反,他们支持 OpenID属性交换用于受限属性(用户名和电子邮件地址,我认为).它比SREG更新,尽管我不确定哪一种在野外更常见.我想,Janrain库应该同时支持这两种方法.

Instead, they support OpenID Attribute Exchange for limited attributes (username and e-mail address, I think). It's newer than SREG, although I'm not sure which is more common in the wild. The Janrain library should support both though, I'd imagine.

如果您要使用确实支持SREG的IdP进行测试,请尝试 MyOpenID .

If you want to test with an IdP that definitely does support SREG, try MyOpenID.

这篇关于PHP SREG中的JanRain OpenID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 07:33