Reputation: 20898
I'm trying to create a new xmpp user from my rails application when a user registers. I did not find an easy way to create a new xmpp user with the xmpp4r (or any other) gem. Do you know how I can manage to create an xmpp user with ruby?
Upvotes: 1
Views: 524
Reputation:
The XMPP server that you connect to must allow in-band registration. When you are sure that the server allows in-band registration, follow the protocol in XEP-0077 to register an XMPP account at the server.
See section 3.1 in the linked XEP for the simple exchange that is required to achieve this.
You can use either xmpp4r or blather to send the stanzas and respond to the server's replies. Blather has no built-in support for XEP-0077, but this only means that you'll have to send the stanzas manually.
xmpp4r comes with a register
method that should do all that for you (see docs here).
Upvotes: 1