Janrain php 库和 OpenId 的 google 端点
我使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
它在这里工作。 一些提示:
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 中默认处于关闭状态。it's working here. some hints:
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, likeexample.blogspot.com
, for which it returns Claimed Identifier, Server URL, Service types, etc.<?
and<?=
indiscover.php
(replacing them with<?php
and<?php echo
). alternatively, you canini_set('short_open_tag', '1')
. it's off by default inphp.ini-recommended
.这是合法的牛肉。 谷歌表示他们支持 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
您需要进行定向身份请求。 通常,这只需要传递 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).
我建议你看看这个问题:Janrain's PHP-OpenID 和 Google/Yahoo
I suggest you look this question: Janrain's PHP-OpenID and Google/Yahoo