PHP SREG 中的 JanRain OpenID?

发布于 2024-08-25 09:19:47 字数 446 浏览 6 评论 0原文

我使用我发现的名为 open-id 选择器的修改后的登录设置了演示。登录工作正常并且身份 url 返回,但我要求的 SREG 数据从未填充、必需或可选。我正在使用 Gmail 帐户登录我的页面。这是我编辑的 try_auth.php 中的代码

$sreg_request = Auth_OpenID_SRegRequest::build( // 必需的 数组('电子邮件'), // 选修的 array('fullname', 'gender', 'timezone', 'dob', 'country'));

给出了什么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

弃爱 2024-09-01 09:19:47

Google 的 OpenID 身份提供商不支持 SREG。

相反,他们支持有限属性(用户名和电子邮件)的 OpenID 属性交换邮件地址,我想)。它比 SREG 新,尽管我不确定哪个在野外更常见。我想 Janrain 库应该支持两者。

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文