JanRain OpenID in PHP SREG?

南楼画角 提交于 2019-12-06 08:53:00

问题


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'));

what gives?


回答1:


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

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.

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



来源:https://stackoverflow.com/questions/2459565/janrain-openid-in-php-sreg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!