Google 是唯一需要“identifier_select”的 OpenID 提供商吗?

发布于 2024-09-05 16:29:00 字数 856 浏览 6 评论 0原文

我正在 PHP 中开发 OpenID 使用者,并使用出色的 LightOpenID 库 (http://gitorious.org/lightopenid)。根据示例客户端脚本中的代码,我已成功创建了一个消费者。但是,我遇到了一个障碍:Google 要求将 openid.identityopenid.claimed_id 设置为 "http://specs.openid。 net/auth/2.0/identifier_select"(请参阅此处< /a>)。如果我这样做,它会起作用,但其他提供商(即 AOL)则不会。

我的问题如下:

  1. Google 是一个特例吗?它是唯一需要 identifier_select 的 OpenID 提供商吗?这与 OpenID 规范相反?
  2. LightOpenID 库有什么缺点吗?
  3. 我对 OpenID 工作原理的理解是否不正确?
  4. 如果 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:

  1. Is Google a corner case –– is it the only OpenID provider where identifier_select is required, contrary to the OpenID specs?
  2. Is there a shortcoming in the LightOpenID library?
  3. Is my understanding of how OpenID works incorrect?
  4. 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 技术交流群。

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

发布评论

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

评论(3

谁对谁错谁最难过 2024-09-12 16:29:01

谷歌并不违反该规范。 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.

如痴如狂 2024-09-12 16:29:01

这用于在 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.

叫思念不要吵 2024-09-12 16:29:00

LightOpenID 作者在这里。

  1. 规范允许它,所以它可能不是唯一的(其他答案提到雅虎)
  2. 不,没有 - LightOpenID 支持这一点。 (请参阅库中的 example-google.php)。
  3. 您仍然需要知道发现 url,因此您需要了解提供者。或者告诉用户输入 https://www.google.com/accounts/o8/id 作为他们的身份。

请注意,这个答案是关于我的库的最新版本,它是在提出这个问题后推送的。对于仍然遇到此问题的任何人,请下载最新版本

The LightOpenID author here.

  1. The spec allows it, so it probably isn't the only one (other answers mention Yahoo)
  2. No, there isn't – LightOpenID supports this. (see example-google.php in the library).
  3. You still need to know a discovery url, so you need to know the provider. Or tell users to enter https://www.google.com/accounts/o8/id as their identity.

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

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