开发者

XMPP to show presence and without login in a web application?

开发者 https://www.devze.com 2023-01-15 15:42 出处:网络
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 pa开发者_如何学Pythonge?I assume that you want to send a <

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 pa开发者_如何学Pythonge?


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消