XMPP 在 Web 应用程序中显示存在且无需登录?

发布于 2024-09-19 00:18:34 字数 59 浏览 1 评论 0原文

主要问题是,如何确保人们可以安全地登录到 xmpp 服务器,而无需从 Web 应用程序登录页面再次登录?

The main problem is, how would you ensure people can login to the xmpp server securely without having to login again from the web app login page?

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

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

发布评论

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

评论(1

梦萦几度 2024-09-26 00:18:34

我假设您想要发送 节来指示用户可用。在这种情况下,您需要通过手动登录或其他方式实例化新会话。

如果您想自动登录用户并启动应用程序,请尝试使用 localStorage,然后触发登录,以便看起来用户没有登录。

如果您想发送 chat 或类似的内容,您也许可以使用预先存在的 BOSH 连接。问题是您不会出现在花名册中的 JID 中,因为没有发送任何探测器。

我推荐第一个解决方案。第二个目的是为了提供更多信息。如果情况紧急,请访问 http://xmpp.org。查看 BOSH XEP(如果您正在使用它)、RFC 3920(XMPP Core)和 RFC 3921(XMPP IM)。

I assume that you want to send a <presence/> stanza indicating that the user is available. In that case, you need to instantiate a new session, either by logging in manually, or other means.

If you want to automatically login a user and start up the application, try using localStorage, then triggering login so that it seems like the user did not login.

If you wanted to send a <presence><show>chat</show></presence> or something akin to that, you might be able to get away with using a preexisting BOSH connection. The problem with that is you won't presence from JIDs in the roster because no probes were sent out.

I recommend the first solution. The second is there more for informational purposes than anything else. And if push comes to shove, go to http://xmpp.org. Look through BOSH XEP (if you are using it), RFC 3920 (XMPP Core) and RFC 3921 (XMPP IM).

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