C++ 中的 OpenID 身份验证多人网络游戏

发布于 2024-09-09 11:53:43 字数 580 浏览 6 评论 0原文

我正在计划是一个多人网络C++游戏中的OpenID客户端。托管商可以选择仅允许能够通过 OpenID 进行身份验证的人员登录。我还希望只允许某些人登录。

我们的代码中已经有一些简单的 HTML 查看器(并且我们计划迁移到 WebKit),因此显示 HTML(用于 OpenID 端点登录)并不是真正的问题。

我们还有 HTTP 请求的代码(我们已经在这里迁移到 libcurl)。

我还没有找到任何 C++ 代码来完成其余的工作(实际的 OpenID 端点握手)。有这方面的 C++ 代码吗?

如果没有,从哪里开始比较好?我对 OpenID 的内部结构并没有太多的想法。自己写代码复杂吗?

这样可能吗?我想我已经看到我必须将一些身份验证站点 URL 等放入 OpenID 端点,如果登录成功,它将返回到该端点。在这种情况下,没有您通过 OpenID 登录的站点,它是一个游戏服务器。

如果这样做真的有问题,我们也有自己的网络服务器(一个用于我们的论坛,我们有 SourceForge 一个),所以我们也可以在那里做所有的事情。然而,这有一个巨大的缺点,即游戏依赖于某些网站来进行 OpenID 登录,这是非常糟糕的——OpenID 的优点之一消失了。

I am planning is an OpenID client in a multiplayer network C++ game. The hoster will have the option to allow only logins from people who can authenticate via OpenID. Also I want to make it possible to allow only certain people to login.

We already have some simple HTML viewer in our code (and we plan to migrate to WebKit), so displaying HTML (for the OpenID endpoint login) is not really a problem.

We also have code for HTTP requests (we have already migrated to libcurl here).

I haven't found any C++ code for doing the rest (the actual OpenID endpoint handshake). Is there any C++ code for this?

If not, where is a good point to start? I don't really have much ideas about the OpenID internals. Is it complicated to code that myself?

Is it possible at all like this? I think I have seen that I must put some authentication site URL or so to the OpenID endpoint where it will return to if the login is successful. In this case, there is no site where you login via OpenID, it is a gameserver.

If that is really a problem to do it this way, we also have our own webserver (one for our forum and we have the SourceForge one), so we could also do all the stuff there. However, this has the huge drawback that the game depends on some website for the OpenID login, which is very bad -- one of the nice advantages of OpenID is gone.

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

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

发布评论

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

评论(1

娇纵 2024-09-16 11:53:44

libopkele 对您有帮助吗?

此处有一个关于配置错误的问题。

Does libopkele help you?

There is a question about a configuration error with it here.

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