summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-08-17 10:18:11 -0700
committerLance Stout <lancestout@gmail.com>2012-08-17 10:18:11 -0700
commitff28b0a005410a2604b7b889e0347ae9d6a7efd9 (patch)
tree7f4299c56175ad17abad6f1ac360f565e9cf3712 /sleekxmpp
parenta249f8736ac601dff8e5c06d850016383cc28d82 (diff)
parent8a03bd72ae5d07ebee2bcd13e66441a94edd4f1a (diff)
downloadslixmpp-ff28b0a005410a2604b7b889e0347ae9d6a7efd9.tar.gz
slixmpp-ff28b0a005410a2604b7b889e0347ae9d6a7efd9.tar.bz2
slixmpp-ff28b0a005410a2604b7b889e0347ae9d6a7efd9.tar.xz
slixmpp-ff28b0a005410a2604b7b889e0347ae9d6a7efd9.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/basexmpp.py7
-rw-r--r--sleekxmpp/features/feature_mechanisms/mechanisms.py8
2 files changed, 10 insertions, 5 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py
index 9e5b9bbf..282c0c31 100644
--- a/sleekxmpp/basexmpp.py
+++ b/sleekxmpp/basexmpp.py
@@ -68,7 +68,12 @@ class BaseXMPP(XMLStream):
#: An identifier for the stream as given by the server.
self.stream_id = None
- #: The JabberID (JID) used by this connection.
+ #: The JabberID (JID) requested for this connection.
+ self.requested_jid = JID(jid)
+
+ #: The JabberID (JID) used by this connection,
+ #: as set after session binding. This may even be a
+ #: different bare JID than what was requested.
self.boundjid = JID(jid)
self._expected_server_name = self.boundjid.host
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py
index c5b4c754..672f4fa6 100644
--- a/sleekxmpp/features/feature_mechanisms/mechanisms.py
+++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py
@@ -92,13 +92,13 @@ class FeatureMechanisms(BasePlugin):
values = required_values.union(optional_values)
for value in values:
if value == 'username':
- result[value] = self.xmpp.boundjid.user
+ result[value] = self.xmpp.requested_jid.user
elif value == 'password':
result[value] = creds['password']
elif value == 'authzid':
result[value] = creds.get('authzid', '')
elif value == 'email':
- jid = self.xmpp.boundjid.bare
+ jid = self.xmpp.requested_jid.bare
result[value] = creds.get('email', jid)
elif value == 'channel_binding':
if sys.version_info >= (3, 3):
@@ -106,9 +106,9 @@ class FeatureMechanisms(BasePlugin):
else:
result[value] = None
elif value == 'host':
- result[value] = self.xmpp.boundjid.domain
+ result[value] = self.xmpp.requested_jid.domain
elif value == 'realm':
- result[value] = self.xmpp.boundjid.domain
+ result[value] = self.xmpp.requested_jid.domain
elif value == 'service-name':
result[value] = self.xmpp._service_name
elif value == 'service':