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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
registermethod that should do all that for you (see docs here).