Jabber the process of registering a new user (Jabberd + gloox)
Source: Internet
Author: User
The process of registering a new user in the Jabber protocol by actually sending and receiving packets from the network
Example server is using the JabberD2 S7 version of the client is Gloox version 0.8 of the registration test program
With other servers and clients, it may be different, but in general it should be the same
C->s 001
<?xml version= ' 1.0 '?>
<stream:stream to= ' jabber.org '
xmlns= ' Jabber:client '
Xmlns:stream= ' Http://etherx.jabber.org/streams '
xml:lang= ' en '
Version= ' 1.0 ' >
The client establishes a connection to the server, version= ' 1.0 ' represents the XMPP version of the client, not the 0.x version, the o.x version and the 1.0 version of the authentication method is different
C->s 004
<iq id= ' uid1 ' type= ' get ' >
<query xmlns= ' Jabber:iq:register '/>
</iq>
Client sends a request to register a new user
S->c 005
<iq xmlns= ' jabber:client ' id= ' uid1 ' type= ' result ' >
<query xmlns= ' Jabber:iq:register ' >
<username/>
<password/>
<instructions>enter a username and password to register with this server.</instructions>
</query>
</iq>
The field to use when the server returns the registered user, and the registration prompt information
C->s 006
<iq id= ' Uid2 ' type= ' Set ' >
<query xmlns= ' Jabber:iq:register ' >
<username>test3</username>
<password>1234</password>
</query>
</iq>
The client sends the registration information as requested by the server
S->C 007
<iq xmlns= ' jabber:client ' id= ' uid2 ' type= ' result '/>
Server returns registration results
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.