使用您自己的域获得可靠 OpenID 的提示
我正在尝试使用我的域名作为标识符来构建基于 OpenID 的个人在线身份。我希望能够完成这一切:
- 将
http://alvaro.es/
作为我的标识符。 - 能够透明地切换提供商。
- 登录任何接受 OpenID 的第三方站点。
- 能够提供个人详细信息(电子邮件、时区、头像...)并获得是否将其发送到请求这些信息的网站的提示。
- 在我自己的(PHP 驱动的)站点中接受 OpenID,无需购买 SSL 托管。
我已阅读常用文档并且我一直在评估多个 OpenID 提供商(Google、Yahoo、myOpenID...甚至运行我自己的服务器)。事实上,我使用 OpenID 一段时间了,并且:
- 提供商提供的文档非常稀缺,或者根本不提供。
- 无论我选择哪个提供商,总会有一些网站登录失败(通常没有错误消息)。
- 我对提供者返回的标识符几乎没有控制(或根本没有)。
- 我仍然不明白这一切到底是如何运作的。
我正在寻找一般性建议,但我知道这可能是主观的,所以我会提出一些具体问题。
到目前为止,我正在尝试 myOpenId 作为提供者和 LightOpenID 作为消费者。我的问题是:
我的URL 提供了 HTTP 标头:
<前><代码> X-XRDS-位置:http://kalvaro.myopenid.com/?xrds=1...以及以下 HTML 标记:
; ;
正确吗?够了吗?
myOpenID 提供Your Domains,这是一个注册自己域名的功能,但我还不敢测试它(它需要更改 DNS),并且配置表单建议我必须在以下两者之间进行选择
http://openid.alvaro.es/username
和http://username.alvaro.es/
作为标识符(不是http://alvaro.es /)。但是,如果没有此功能,Stackoverflow 仍会将
alvaro.es
报告为我的标识符。我需要使用它吗?实现 LightOpenID 时,我将本地用户与
$openid->identity
进行匹配(其中$openid
是LightOpenID
的实例)目的)。该属性似乎是用户提供的 URL。正确吗?是否有比我选择的更合适的提供者或消费者库?
I'm trying to build a personal OpenID-based online identity using my domain name as identifier. I want to be able to accomplish all this:
- Make
http://alvaro.es/
my identifier. - Be able to switch providers transparently.
- Log into any third-party site that accepts OpenID.
- Be able to provide personal details (e-mail, time zone, avatar...) and get prompted whether to send them or not to sites that request them.
- Accept OpenID in my own (PHP-powered) sites without the need of purchasing SSL hosting.
I've read the usual doc and I've been evaluating several OpenID providers (Google, Yahoo, myOpenID... and even running my own server). The fact is that I've been using OpenID for a while and:
- Providers offer very scarce documentation or none at all.
- No matter what provider I choose, there are always sites where log-in fails (typically without an error message).
- I have little control (or none at all) on the identifier returned by the provider.
- I still can't understand how all this really works.
I'm looking for general advice but I understand that can be subjective so I'll make a few specific questions.
So far, I'm trying out myOpenId as provider and LightOpenID as consumer. My questions are:
My URL provides an HTTP header:
X-XRDS-Location: http://kalvaro.myopenid.com/?xrds=1
... and the following HTML tags:
<link rel="openid.server openid2.provider" href="http://www.myopenid.com/server"> <link rel="openid.delegate openid2.local_id" href="http://kalvaro.myopenid.com">
Is it correct? Is it enough?
myOpenID provides Your Domains, a feature to register your own domain name but I haven't dared to test it (it needs changes to the DNS) and the configuration form suggests I have to choose between
http://openid.alvaro.es/username
andhttp://username.alvaro.es/
as identifier (nothttp://alvaro.es/
). However, Stackoverflow still reportsalvaro.es
as my identifier without this feature. Do I need to use it?When implementing LightOpenID, I match the local user against
$openid->identity
(where$openid
is the instance of theLightOpenID
object). This attribute appears to be the URL supplied by the user. Is it correct?Are there more adequate providers or consumer libraries than the ones I chose?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想知道的其他事项:
至于 openid 的工作原理,请参阅该问题的一些答案。
Other things you might want to know:
As for how the openid works, see some answers to that question on SO.