summaryrefslogtreecommitdiff
path: root/sleekxmpp/features/feature_mechanisms/mechanisms.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-11-27 19:53:04 -0500
committerLance Stout <lancestout@gmail.com>2012-11-27 19:53:04 -0500
commit2c2498b65846397ce708452ff45f81ecc25b502f (patch)
tree7b0ed2432601fdaed1542cfc377c01c0db8c1210 /sleekxmpp/features/feature_mechanisms/mechanisms.py
parent7a1ed64985a7cbfe48e834838d30e202f1c692e4 (diff)
downloadslixmpp-2c2498b65846397ce708452ff45f81ecc25b502f.tar.gz
slixmpp-2c2498b65846397ce708452ff45f81ecc25b502f.tar.bz2
slixmpp-2c2498b65846397ce708452ff45f81ecc25b502f.tar.xz
slixmpp-2c2498b65846397ce708452ff45f81ecc25b502f.zip
Allow for more credential values to be user specified instead of auto-filled.
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms/mechanisms.py')
-rw-r--r--sleekxmpp/features/feature_mechanisms/mechanisms.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py
index b480d5be..a6e43a76 100644
--- a/sleekxmpp/features/feature_mechanisms/mechanisms.py
+++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py
@@ -92,11 +92,7 @@ class FeatureMechanisms(BasePlugin):
values = required_values.union(optional_values)
for value in values:
if value == 'username':
- result[value] = self.xmpp.requested_jid.user
- elif value == 'password':
- result[value] = creds['password']
- elif value == 'authzid':
- result[value] = creds.get('authzid', '')
+ result[value] = creds.get('username', self.xmpp.requested_jid.user)
elif value == 'email':
jid = self.xmpp.requested_jid.bare
result[value] = creds.get('email', jid)
@@ -106,13 +102,13 @@ class FeatureMechanisms(BasePlugin):
else:
result[value] = None
elif value == 'host':
- result[value] = self.xmpp.requested_jid.domain
+ result[value] = creds.get('host', self.xmpp.requested_jid.domain)
elif value == 'realm':
- result[value] = self.xmpp.requested_jid.domain
+ result[value] = creds.get('realm', self.xmpp.requested_jid.domain)
elif value == 'service-name':
- result[value] = self.xmpp._service_name
+ result[value] = creds.get('service-name', self.xmpp._service_name)
elif value == 'service':
- result[value] = 'xmpp'
+ result[value] = creds.get('service', 'xmpp')
elif value in creds:
result[value] = creds[value]
return result