Difference between revisions of "Programming XMPP Clients"

Jump to navigation Jump to search
m
no edit summary
m
 
Line 1: Line 1:
'''This page is very old. (READ [http://xmpp.org/rfcs/rfc6120.html RFC 6120] / [http://xmpp.org/rfcs/rfc6121.html RFC 6121] / [http://xmpp.org/rfcs/rfc6122.html RFC 6122])'''
== Basic Notes ==
== Basic Notes ==
You must know there is:
You must know there is:
# <iq/> - for command exchanges
# <iq/> - for command exchanges
Line 13: Line 14:
Sounds complicate? Nah, it is not ;) You will know when the time comes...
Sounds complicate? Nah, it is not ;) You will know when the time comes...


''In case an item does not contain a '''to''' the item will be delivered to user's own Jabber server!''
''In case an item does not contain a '''to''' the item will be delivered to user's own XMPP server!''


== Connecting to a server ==
== Connecting to a server ==
 
Usually a XMPP server listens on port 5222 (TCP). As soon as you have connected and established a XML stream the server expects authentification as a user ([[#The log-in-process (aka authentication with a server or service)]]). Depending on server settings an option to create a new account is offered, too ([[#Creating a new account]]).
Usually a Jabber server listens on port 5222 (TCP). As soon as you have connected and established a XML stream the server expects authentification as a user ([[#The log-in-process (aka authentication with a server or service)]]). Depending on server settings an option to create a new account is offered, too ([[#Creating a new account]]).


'''For a normal TCP socket the stream is established like this ([http://www.ietf.org/rfc/rfc3920.txt RFC 3920] Section 4.8.):'''
'''For a normal TCP socket the stream is established like this ([http://www.ietf.org/rfc/rfc3920.txt RFC 3920] Section 4.8.):'''
Line 78: Line 78:


=== Secure connections ===
=== Secure connections ===
* '''Note''', there are two layers of security to consider:
* '''Note''', there are two layers of security to consider:
:# Client <-> Server (encryption of the TCP connection; TLS and SASL should be used)
:# Client <-> Server (encryption of the TCP connection; TLS and SASL should be used)
Line 135: Line 134:


== The log-in-process (aka authentication with a server or service) ==
== The log-in-process (aka authentication with a server or service) ==
'''NOTE:''' This section is out of date! XMPP uses SASL for authentication, as described in [http://xmpp.org/rfcs/rfc6120.html#sasl RFC 6120]. The stanzas described here are a legacy protocol that is discontinued in many servers today.
'''NOTE:''' This section is out of date! XMPP uses SASL for authentication, as described in [http://xmpp.org/rfcs/rfc6120.html#sasl RFC 6120]. The stanzas described here are a legacy protocol that is discontinued in many servers today.


Line 142: Line 140:
Under some circumstances you might want to provide the password as a '''digest'''; see [http://xmpp.org/extensions/xep-0078.html XEP-0078: Non-SASL Authentication] for more details about this.  
Under some circumstances you might want to provide the password as a '''digest'''; see [http://xmpp.org/extensions/xep-0078.html XEP-0078: Non-SASL Authentication] for more details about this.  


For authentication with Jabber servers and services the jabber:iq:auth namespace must be used:
For authentication with XMPP servers and services the jabber:iq:auth namespace must be used:
# Client requests required fields from server.
# Client requests required fields from server.
# Client authentication.
# Client authentication.
217

edits

Navigation menu