mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-23 19:19:53 +00:00
Enable forcing a specififc SASL mech:
xmpp = ClientXMPP(jid, password, { 'feature_mechanisms': {'use_mech':'PLAIN'}})
This commit is contained in:
parent
75f23d1130
commit
572becad44
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue