2011-08-04 00:00:51 +00:00
|
|
|
from sleekxmpp.thirdparty.suelta.sasl import Mechanism, register_mechanism
|
|
|
|
from sleekxmpp.thirdparty.suelta.exceptions import SASLError, SASLCancelled
|
|
|
|
|
|
|
|
|
|
|
|
class ANONYMOUS(Mechanism):
|
|
|
|
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self, sasl, name):
|
|
|
|
"""
|
|
|
|
"""
|
2011-08-05 21:06:58 +00:00
|
|
|
super(ANONYMOUS, self).__init__(sasl, name, 0)
|
2011-08-04 00:00:51 +00:00
|
|
|
|
|
|
|
def get_values(self):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
return {}
|
|
|
|
|
|
|
|
def process(self, challenge=None):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
return b'Anonymous, Suelta'
|
|
|
|
|
|
|
|
def okay(self):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
return True
|
|
|
|
|
|
|
|
def get_user(self):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
return 'anonymous'
|
|
|
|
|
|
|
|
|
|
|
|
register_mechanism('ANONYMOUS', 0, ANONYMOUS, use_hashes=False)
|