diff options
Diffstat (limited to 'sleekxmpp/plugins/xep_0078/legacyauth.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0078/legacyauth.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sleekxmpp/plugins/xep_0078/legacyauth.py b/sleekxmpp/plugins/xep_0078/legacyauth.py index dec775a3..95587843 100644 --- a/sleekxmpp/plugins/xep_0078/legacyauth.py +++ b/sleekxmpp/plugins/xep_0078/legacyauth.py @@ -9,17 +9,19 @@ import logging import hashlib import random +import sys +from sleekxmpp.exceptions import IqError, IqTimeout from sleekxmpp.stanza import Iq, StreamFeatures from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin -from sleekxmpp.plugins.base import base_plugin +from sleekxmpp.plugins import BasePlugin from sleekxmpp.plugins.xep_0078 import stanza log = logging.getLogger(__name__) -class xep_0078(base_plugin): +class XEP_0078(BasePlugin): """ XEP-0078 NON-SASL Authentication @@ -28,11 +30,12 @@ class xep_0078(base_plugin): unless you are forced to use an old XMPP server implementation. """ - def plugin_init(self): - self.xep = "0078" - self.description = "Non-SASL Authentication" - self.stanza = stanza + name = 'xep_0078' + description = 'XEP-0078: Non-SASL Authentication' + dependencies = set() + stanza = stanza + def plugin_init(self): self.xmpp.register_feature('auth', self._handle_auth, restart=False, @@ -41,7 +44,6 @@ class xep_0078(base_plugin): register_stanza_plugin(Iq, stanza.IqAuth) register_stanza_plugin(StreamFeatures, stanza.AuthFeature) - def _handle_auth(self, features): # If we can or have already authenticated with SASL, do nothing. if 'mechanisms' in features['features']: |