Not logged in. · Lost password · Register
Forum: XMPP Protocol RSS
Unable to create accounts using agsxmpp with OpenFire, details are ignored.
Avatar
firkinfedup #1
Member since Aug 2009 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: Account creation on OpenFire
Hi there.

I have some account creation code that I have been using fine with eJabberd, unfortunately this doesn't seem to work with OpenFire, I'm getting back the following...

<query xmlns="jabber:iq:register"><username>bob</username><password>password</password><email>someone@domain.com</email><name>bob</name><x xmlns="jabber:x:data" type="form"><title>XMPP Client Registration</title><instructions>Please provide the following information</instructions><field type="hidden" var="FORM_TYPE"><value>jabber:iq:register</value></field><field label="Username" var="username" type="text-single"><required /></field><field label="Full name" var="name" type="text-single" /><field label="Email" var="email" type="text-single" /><field label="Password" var="password" type="text-private"><required /></field></x></query>

Any idea how I can resolve this?

Nick.
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you have to use the OnRegisterInformation event and process the Register Element. According to your log Openfire supports both, XData and old jabber style registration.

If I remember correctly Openfire accepts either the xdata form or the username, password and email tag. So you have to decide on one, and remove the other fields on the OnRegisterInformation callback.

Alex
Avatar
firkinfedup #3
Member since Aug 2009 · 9 posts
Group memberships: Members
Show profile · Link to this post
I've managed to get it to work, partially.  It seems that if Auto is set to true it will work, but then it only passes the username and password, I want to provide all information including the email address, but if I set Auto to false and fill in the data myself it just doesn't work, the previously posted data gets returned.
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
then you didn't fill the data correctly in the OnRegisterInformation event.
Please attach the XML logs with success and failure.

Alex
Avatar
firkinfedup #5
Member since Aug 2009 · 9 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex on 2010-01-08, 18:55:
then you didn't fill the data correctly in the OnRegisterInformation event.
Please attach the XML logs with success and failure.

Alex

Hi Alex,

I got there in the end by modifying the XML data and adding value elements to the form, then removing the additional elements repeated in the root of the node.

All sorted now, thanks for your help.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: