summaryrefslogtreecommitdiff
path: root/sleekxmpp/features/feature_mechanisms/mechanisms.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-09 00:51:49 -0700
committerLance Stout <lancestout@gmail.com>2011-08-09 00:51:49 -0700
commit572becad44b8cb577a1f8357e04fa93235894536 (patch)
treece70f114fa9f5f68adfad549f045d88888a2e930 /sleekxmpp/features/feature_mechanisms/mechanisms.py
parent75f23d11301f09a29db4d0cc185dd5ffdc4a18fe (diff)
downloadslixmpp-572becad44b8cb577a1f8357e04fa93235894536.tar.gz
slixmpp-572becad44b8cb577a1f8357e04fa93235894536.tar.bz2
slixmpp-572becad44b8cb577a1f8357e04fa93235894536.tar.xz
slixmpp-572becad44b8cb577a1f8357e04fa93235894536.zip
Enable forcing a specififc SASL mech:
xmpp = ClientXMPP(jid, password, { 'feature_mechanisms': {'use_mech':'PLAIN'}})
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms/mechanisms.py')
-rw-r--r--sleekxmpp/features/feature_mechanisms/mechanisms.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py
index 2debf3be..a6cff0a0 100644
--- a/sleekxmpp/features/feature_mechanisms/mechanisms.py
+++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py
@@ -29,6 +29,8 @@ class feature_mechanisms(base_plugin):
self.description = "SASL Stream Feature"
self.stanza = stanza
+ self.use_mech = self.config.get('use_mech', None)
+
def tls_active():
return 'starttls' in self.xmpp.features
@@ -48,7 +50,8 @@ class feature_mechanisms(base_plugin):
username=self.xmpp.boundjid.user,
sec_query=suelta.sec_query_allow,
request_values=sasl_callback,
- tls_active=tls_active)
+ tls_active=tls_active,
+ mech=self.use_mech)
register_stanza_plugin(StreamFeatures, stanza.Mechanisms)