mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
Sync with Suelta.
This commit is contained in:
parent
c578ddeb1a
commit
6b9a55e62d
2 changed files with 3 additions and 4 deletions
|
@ -43,7 +43,7 @@ class Auth(StanzaBase):
|
||||||
if not self['mechanism'] in self.plain_mechs:
|
if not self['mechanism'] in self.plain_mechs:
|
||||||
self.xml.text = bytes(base64.b64encode(values)).decode('utf-8')
|
self.xml.text = bytes(base64.b64encode(values)).decode('utf-8')
|
||||||
else:
|
else:
|
||||||
self.xml.text = values
|
self.xml.text = bytes(values).decode('utf-8')
|
||||||
|
|
||||||
def del_value(self):
|
def del_value(self):
|
||||||
self.xml.text = ''
|
self.xml.text = ''
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
from sleekxmpp.thirdparty.suelta.util import hash, bytes
|
from sleekxmpp.thirdparty.suelta.util import bytes
|
||||||
from sleekxmpp.thirdparty.suelta.sasl import Mechanism, register_mechanism
|
from sleekxmpp.thirdparty.suelta.sasl import Mechanism, register_mechanism
|
||||||
from sleekxmpp.thirdparty.suelta.exceptions import SASLError, SASLCancelled
|
|
||||||
|
|
||||||
|
|
||||||
class X_MESSENGER_OAUTH2(Mechanism):
|
class X_MESSENGER_OAUTH2(Mechanism):
|
||||||
|
@ -10,7 +9,7 @@ class X_MESSENGER_OAUTH2(Mechanism):
|
||||||
self.check_values(['access_token'])
|
self.check_values(['access_token'])
|
||||||
|
|
||||||
def process(self, challenge=None):
|
def process(self, challenge=None):
|
||||||
return self.values['access_token']
|
return bytes(self.values['access_token'])
|
||||||
|
|
||||||
def okay(self):
|
def okay(self):
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue