Janrain php 库和 OpenId 的 google 端点

发布于 2024-07-15 06:13:00 字数 466 浏览 12 评论 0原文

我使用 janRain Php 库进行 OpenId 和 yadis 发现,无论我做什么,我都会在 user.openid.org 或我自己的提供商之类的东西中工作,但如果我尝试使用 google 端点,我将无法获取任何发现信息。

即使我运行 janrain 库的发现示例,我也会得到下一个结果 Claimed,

Identifier  http://www.google.com/accounts/o8/id
No OpenID services discovered.

并且如果我在 url 之前添加 https://,也会发生同样的情况。

我的问题可能不是如何让它工作,但如果它实际上可能,我还有什么其他选择(在我的网站上运行,项目中不需要时髦的身份验证)。

为什么 openId 如此#@!#@ 复杂且无文档记录?(注意,我给了 zend_openid 几个小时才能得到相同的结果)

Im using janRain Php library for OpenId and yadis discovery and no matter what i do, i will work in stuff like user.openid.org or my own provider, but if i try to use the google endpoint, i cant get any discovery information.

Even if i run the discovery example for the janrain library, i get the next result Claimed

Identifier  http://www.google.com/accounts/o8/id
No OpenID services discovered.

and it happens the same if I add the https:// before the url.

My question is probably not how to make it work, but if its actually possible, what other choices do i have (that run in my site, no sassy auth wanted in the project).

Why is openId so #@!#@ complex and undocumented?(note, i gave zend_openid a couple of hours to have the same result)

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

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

发布评论

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

评论(4

不一样的天空 2024-07-22 06:13:00

它在这里工作。 一些提示:

  • 据我了解,http(s)://www.google.com/accounts/o8/id 不是 openid 端点,而是 google 的 discovery 端点。 你必须向它提供一个有效的 (google) OpenID 标识符,例如 example.blogspot.com,它会返回声明的标识符、服务器 URL、服务类型等。
  • 我只有在之后才可以使用发现示例修复 discover.php 中的 (将其替换为 )。 或者,您也可以ini_set('short_open_tag', '1')。 它在 php.ini-recommended 中默认处于关闭状态。
  • 你的 PHP 安装支持 SSL 吗? 请参阅 README,特别是这部分:
Not all PHP installations support SSL.  You can find out if yours
supports SSL by reading the "HTTP Fetching" section of the output of
"examples/detect.php."  If your installation does not support SSL,
then https:// identity URLs and server URLs will not be supported by
the library.  An attempt to use such an identity URL will be
equivalent to using an invalid OpenID.  To enable SSL support,
recompile PHP with OpenSSL support or install the appropriate OpenSSL
module for your platform.  If you are using CURL, CURL will need to be
built with OpenSSL support.

it's working here. some hints:

  • as i understand it, http(s)://www.google.com/accounts/o8/id is not an openid endpoint, but googles discovery endpoint. you have to supply it a valid (google) OpenID Identifier, like example.blogspot.com, for which it returns Claimed Identifier, Server URL, Service types, etc.
  • i got the discovery example only working after fixing the <? and <?= in discover.php (replacing them with <?php and <?php echo). alternatively, you can ini_set('short_open_tag', '1'). it's off by default in php.ini-recommended.
  • does your PHP installation support SSL? see README, specifically this part:
Not all PHP installations support SSL.  You can find out if yours
supports SSL by reading the "HTTP Fetching" section of the output of
"examples/detect.php."  If your installation does not support SSL,
then https:// identity URLs and server URLs will not be supported by
the library.  An attempt to use such an identity URL will be
equivalent to using an invalid OpenID.  To enable SSL support,
recompile PHP with OpenSSL support or install the appropriate OpenSSL
module for your platform.  If you are using CURL, CURL will need to be
built with OpenSSL support.
静待花开 2024-07-22 06:13:00

这是合法的牛肉。 谷歌表示他们支持 OpenID,但他们的功能与其他人不同。 MyOpenID.com、blogspot、aol、yahoo、wordpress、myspace、livejournal 和许多其他网站都正确支持该标准,并且按预期工作。 与您自己的 OpenID 提供程序一样,您可以使用 CommunityID 服务器项目进行构建。

/叹

This is a legitimate beef. Google says they support OpenID, but theirs doesn't work like ANYONE elses. MyOpenID.com, blogspot, aol, yahoo, wordpress, myspace, livejournal and many others all support the standard correctly and it works as expected. As does your own OpenID provider you can build using the CommunityID server project.

/sigh

ゝ杯具 2024-07-22 06:13:00

您需要进行定向身份请求。 通常,这只需要传递 URL,就好像用户输入了它一样……这在过去一直对我有用(只要您使用的库支持 OpenID2.0)。

You need to do a directed identity request. Normally that just involves passing the URL as though the user had entered it... that's always worked for me in the past (so long as the library you use supports OpenID2.0).

棒棒糖 2024-07-22 06:13:00

我建议你看看这个问题:Janrain's PHP-OpenID 和 Google/Yahoo

I suggest you look this question: Janrain's PHP-OpenID and Google/Yahoo

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