所有这些 Javascript OpenID 库是如何工作的?
有几个用 Javascript 实现的 OpenID 库(例如 openid-realselector、openid-selector,
There are several OpenID libraries implemented in Javascript (like openid-realselector, openid-selector, jquery.opendid). How do all these work? Do they just provide and call the OpenID provider and then the provider provides some data (how?) and redirects back to my site (to where exactly?)? And now is it my part on the server side to fetch that data somehow and use it to log in my user? I looked at the code of openid-selector, but don't see where to provide a callback url to my site. So I am not sure anymore if the above scenario is really the way how this all works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您提到的库是 OpenID 选择器,即允许轻松选择提供商的美化形式。它们与协议无关,协议必须在服务器端实现。
至于“他们是如何工作的”,他们只需提交一个带有特定字段的表单(
openid_identifier
)。根据您单击的按钮,该字段具有不同的值,如果您没有单击任何值,则只需自己输入即可。然后,服务器端代码获取该值,将其传递给处理 openid 的库。您可以在 http://openid.net/developers/libraries/ 上找到 OpenID(服务器端)库的列表。
The libraries you have mentioned are OpenID selectors, that is, glorified forms allowing for easy selection of a provider. They have nothing to do with the protocol, which must be implemented server-side.
As for "how do they work", they simply submit a form with a certain field (
openid_identifier
). Depending on the button you click, that field has different values, and if you don't click on any, you simply have to input it yourself. Then, a server-side code gets the value, passes it to a library that does handles openid.You can find a list of OpenID (server-side) libraries on http://openid.net/developers/libraries/.