“Required” fields
The list of fields returned in the response to the IQ-get in the
jabber:iq:register namespace is actually supposed to be a list of mandatory
fields:
<name/>
<email/>
<username/>
<password/>
However, with the current version of the Jabber server (1.4.1, which is our reference version for this book), this is not the case.
The <username/> and
<password/> fields are
mandatory; not supplying them or supplying an invalid username or password
will result in an error:
SEND: <iq type='set'>
<query xmlns='jabber:iq:register'>
<username>leslie</username>
<email>lel@plevna.com</email>
<name>Leslie Hawke</name>
</query>
</iq>
RECV: <iq type='error'>
<query xmlns='jabber:iq:register'>
<username>leslie</username>
<email>lel@plevna.com</email>
<name>Leslie Hawke</name>
</query>
<error code='406'>Not Acceptable</error>
</iq>
However, currently, failing to supply any of the other fields—the fields
that are specified in the <register/>
section of the JSM instance’s configuration—will not result in an
error. This may be fixed in a later release. In any case, it’s no great
loss; the details are simply stored in the user’s spool file on the
server, and right now there’s only one situation where this information
is subsequently
used: in answering a browse request made to a user’s JID, the server
looks up the <name/> tag from the
registration data stored and uses the value there in the browse response:
SEND: <iq type='get' to='dj@yak'> <query xmlns='jabber:iq:browse'/> </iq> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access