summaryrefslogtreecommitdiff
path: root/sleekxmpp/util/sasl
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-09-13 11:00:58 -0700
committerLance Stout <lancestout@gmail.com>2012-09-13 11:00:58 -0700
commit67147570e9be7f51fd079c98f1d6db35fe28563c (patch)
tree65d5ba86be1cbc7fc6cebca7a547b5efebceb028 /sleekxmpp/util/sasl
parentdf9ac58d051e195143875e03ce09a3994ade0e00 (diff)
parentfb3e6b7e35bb949f73a756ae5be683e2fec12454 (diff)
downloadslixmpp-67147570e9be7f51fd079c98f1d6db35fe28563c.tar.gz
slixmpp-67147570e9be7f51fd079c98f1d6db35fe28563c.tar.bz2
slixmpp-67147570e9be7f51fd079c98f1d6db35fe28563c.tar.xz
slixmpp-67147570e9be7f51fd079c98f1d6db35fe28563c.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/util/sasl')
-rw-r--r--sleekxmpp/util/sasl/mechanisms.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/sleekxmpp/util/sasl/mechanisms.py b/sleekxmpp/util/sasl/mechanisms.py
index 5822a6e4..55ae44dd 100644
--- a/sleekxmpp/util/sasl/mechanisms.py
+++ b/sleekxmpp/util/sasl/mechanisms.py
@@ -123,6 +123,17 @@ class X_MESSENGER_OAUTH2(Mech):
return self.credentials['access_token']
+@sasl_mech(10)
+class X_OAUTH2(Mech):
+
+ name = 'X-OAUTH2'
+ required_credentials = set(['username', 'access_token'])
+
+ def process(self, challenge=b''):
+ return b'\x00' + self.credentials['username'] + \
+ b'\x00' + self.credentials['access_token']
+
+
@sasl_mech(3)
class X_GOOGLE_TOKEN(Mech):