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

S->c 002
<?xml version= ' 1.0 '?>
<stream:stream xmlns:stream= ' Http://etherx.jabber.org/streams '
xmlns= ' jabber:client ' from= ' jabber.org '
Version= ' 1.0 '
Id= ' 7MH6BXA8X95JS1UBVKXYUPYSZE2XPZ6JHXTRZZPQ ' >
Server Response Connection

S-&GT;C 003
<stream:features xmlns:stream= ' Http://etherx.jabber.org/streams ' >
<mechanisms xmlns= ' URN:IETF:PARAMS:XML:NS:XMPP-SASL ' >
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
</stream:features>
The server returns supported authentication methods

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-&GT;C 007
<iq xmlns= ' jabber:client ' id= ' uid2 ' type= ' result '/>
Server returns registration results

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.