所有这些 Javascript OpenID 库是如何工作的?

发布于 2024-10-04 04:03:04 字数 227 浏览 9 评论 0原文

有几个用 Javascript 实现的 OpenID 库(例如 openid-realselectoropenid-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 技术交流群。

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

发布评论

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

评论(1

陌伤ぢ 2024-10-11 04:03:04

您提到的库是 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/.

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