summaryrefslogtreecommitdiff
path: root/sleekxmpp/util/sasl/mechanisms.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/util/sasl/mechanisms.py')
-rw-r--r--sleekxmpp/util/sasl/mechanisms.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/sleekxmpp/util/sasl/mechanisms.py b/sleekxmpp/util/sasl/mechanisms.py
index 55ae44dd..1eb6af83 100644
--- a/sleekxmpp/util/sasl/mechanisms.py
+++ b/sleekxmpp/util/sasl/mechanisms.py
@@ -9,7 +9,9 @@
Part of SleekXMPP: The Sleek XMPP Library
- :copyright: (c) 2012 Nathanael C. Fritz, Lance J.T. Stout
+ :copryight: (c) 2004-2013 David Alan Cridland
+ :copyright: (c) 2013 Nathanael C. Fritz, Lance J.T. Stout
+
:license: MIT, see LICENSE for more details
"""
@@ -21,7 +23,8 @@ from base64 import b64encode, b64decode
from sleekxmpp.util import bytes, hash, XOR, quote, num_to_bytes
from sleekxmpp.util.sasl.client import sasl_mech, Mech, \
- SASLCancelled, SASLFailed
+ SASLCancelled, SASLFailed, \
+ SASLMutualAuthFailed
@sasl_mech(0)
@@ -86,7 +89,7 @@ class EXTERNAL(Mech):
return self.credentials['authzid']
-@sasl_mech(30)
+@sasl_mech(31)
class X_FACEBOOK_PLATFORM(Mech):
name = 'X-FACEBOOK-PLATFORM'
@@ -467,7 +470,8 @@ class DIGEST(Mech):
'qop': self.qop,
'digest-uri': quote(self.digest_uri()),
'response': self.response(b'AUTHENTICATE'),
- 'maxbuf': self.maxbuf
+ 'maxbuf': self.maxbuf,
+ 'charset': 'utf-8'
}
resp = b''
for key, value in data.items():
@@ -480,7 +484,7 @@ class DIGEST(Mech):
if self.cnonce and self.nonce and self.nonce_count and self.qop:
self.nonce_count += 1
return self.respond()
- return b''
+ return None
data = self.parse(challenge)
if 'rspauth' in data: