Commit graph

15 commits

Author SHA1 Message Date
Lance Stout
86d8736dcc Hash JIDs based on full JID string.
This makes JID objects equivalent to strings in dictionaries, etc.

>>> j = JID('foo@example.com')
>>> s = 'foo@example.com'
>>> d = {j: 'yay'}
>>> d[j]
'yay'
>>> d[s]
'yay'
>>> d[s] = 'yay!!'
>>> d[j]
'yay!!'
2012-01-17 23:03:48 -08:00
Lance Stout
b9332142c9 Update api docs for JID 2011-12-04 13:42:46 -08:00
Lance Stout
43c4d23896 Explicitly test for inequality in JIDs.
Fixes issue #113
2011-11-14 09:15:43 -08:00
Lance Stout
c49a8e9114 Save progress 2011-05-20 17:42:40 -04:00
Lance Stout
632827f213 Fix bug in JID class. Attribute .jid now works properly. 2011-01-13 10:21:20 -05:00
Lance Stout
2908751020 Allow JID objects to be compared with strings.
Two JIDs match if they have the same full JID value.
2011-01-05 20:16:15 -05:00
Lance Stout
60d3afe6b6 Added __repr__ for JIDs. 2010-11-18 00:03:39 -05:00
Lance Stout
185d7cf28e More JID unit tests.
sleekxmpp.xmlstream.jid now has 100% coverage!
2010-10-24 19:06:54 -04:00
Lance Stout
9e3d506651 Fixed resource bug in JIDs.
JIDs without resources will return '' instead of the bare JID.

Cleaned up JID tests, and added check_JID to SleekTest.
2010-10-24 18:22:41 -04:00
Florent Le Coz
2755d732a4 Remove deprecation warnings
Remove all the deprecation warnings by using only boundjid.
And also fix a indentation error.
2010-10-17 08:55:30 +08:00
Florent Le Coz
2d18d905a5 Anonymous authentication
Implemented ANONYMOUS authentication on the ClientXMPP class.
To use it, you just need to provide a domain (e.g 'anon.example.com')
with an optional resource (e.g 'anon.example.com/resource') as the JID,
with no password. The JID class has been improved to accept
domains as fulljid.

You can test this with echo_client.py
python echo_client.py -j anon.louiz.org/  # anonymous with a resource
                                          # defined by the server
python echo_client.py -j anon.louiz.org/resource  # anonymous with given
                                                  # resource

The "normal" authentication method still works exactly like before.
2010-10-17 08:55:30 +08:00
Nathan Fritz
8b5c1010de fixed JID to accept server/domain/host as the same 2010-10-14 16:34:16 -07:00
fritzy
345656926e added form compatibility with old api, stanzas now bool() to True on 2.x, jid attributes will return '' if not set 2010-08-21 22:48:43 +00:00
Lance Stout
aa1dbe97e0 Updated and simplified new JID class to have more documentation and use PEP8 style. 2010-08-04 00:33:28 -04:00
Nathan Fritz
2cb82afc2c updated and moved jid class -- jids now have setters 2010-07-26 18:13:09 -07:00