Google 是唯一需要“identifier_select”的 OpenID 提供商吗?
我正在 PHP 中开发 OpenID 使用者,并使用出色的 LightOpenID 库 (http://gitorious.org/lightopenid)。根据示例客户端脚本中的代码,我已成功创建了一个消费者。但是,我遇到了一个障碍:Google 要求将 openid.identity
和 openid.claimed_id
设置为 "http://specs.openid。 net/auth/2.0/identifier_select"
(请参阅此处< /a>)。如果我这样做,它会起作用,但其他提供商(即 AOL)则不会。
我的问题如下:
- Google 是一个特例吗?它是唯一需要
identifier_select
的 OpenID 提供商吗?这与 OpenID 规范相反? - LightOpenID 库有什么缺点吗?
- 我对 OpenID 工作原理的理解是否不正确?
- 如果 Google 不是唯一需要
identifier_select
的提供商,那么我只需硬编码其中的数量是有限的,还是有办法通过 OpenID 规范来确定这一点?
我对 OpenID 的内部结构很陌生,所以如果这是一个愚蠢的问题,我不会感到惊讶。在搜索互联网后,我无法找到有关此主题的任何信息。
I am developing an OpenID consumer in PHP and am using the fantastic LightOpenID library (http://gitorious.org/lightopenid). Basing my code off of that found in the example client script I have successfully created a consumer. However, I've run across a snag: Google requires the openid.identity
and openid.claimed_id
to be set to "http://specs.openid.net/auth/2.0/identifier_select"
(see here). If I do that it works but other providers (i.e. AOL) don't.
Here are my questions:
- Is Google a corner case –– is it the only OpenID provider where
identifier_select
is required, contrary to the OpenID specs? - Is there a shortcoming in the LightOpenID library?
- Is my understanding of how OpenID works incorrect?
- If Google is not the only provider that requires
identifier_select
are there a finite number of them which I'll just hardcode in, or is there someway to determine this through the OpenID spec?
I'm new to the internals of OpenID so I wouldn't be surprised if this is a dumb question. I haven't been able to find any info on this subject after scouring the Internet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
谷歌并不违反该规范。 OpenID 2.0 规范绝对允许identifier_select 流,这启用了所谓的“定向身份”,Google 是唯一一个(据我所知)实际行使此功能的著名 OP。
是的,一个完全正确实现的 OpenID RP 库会自动注意到 Google(以及任何其他类似的 OP)需要identifier_select,因为它是识别此信息的标识符发现步骤的一部分。对于您正在使用的库,我们深表歉意,但听起来它让您感到悲伤,因为它可能是 OpenID 的不完整实现。
顺便说一句,AOL 确实支持identifier_select。
Google isn't contradicting the spec. The OpenID 2.0 spec absolutely allows for identifier_select flows, which enable something called "directed identity", which Google is the only notable OP (that I know of) that actually exercises the ability to do.
And yes, a fully and correctly implemented OpenID RP library will automatically notice that Google (and any other OP like it) requires identifier_select as it's part of the identifier discovery step that picks up on this. Sorry about the library you're using, but it sounds like it's causing you grief due to perhaps being an incomplete implementation of OpenID.
And by the way, AOL does support identifier_select.
这用于在 OP 驱动 ID 选择模式下进行身份验证。这种情况不太常见,但也不是特例。在我使用的所有 OP 提供商中,我注意到 Google 和 Yahoo 都需要此功能。
这是支持 OpenID 2.0 中的定向身份所必需的。基本上,不同的网站您会获得不同的 OpenID。隐私倡导者正在推动转向这种模式,所以我认为你迟早必须支持这一点。
This is used to authenticate in OP Driven ID Selection mode. It's less common but not a corner case. Among all the OP providers I use, I noticed Google and Yahoo require this.
This is required to support Directed Identity in OpenID 2.0. Basically, you get a different OpenID for different website. There is a push to move to this model by privacy advocates so I think you have to support this soon or later.
LightOpenID 作者在这里。
请注意,这个答案是关于我的库的最新版本,它是在提出这个问题后推送的。对于仍然遇到此问题的任何人,请下载最新版本
The LightOpenID author here.
Note that this answer is about the newest version of my library, which was pushed after this question was asked. For anyone still struggling with this problem, please download the newest version