Bump to 1.3.1
[slixmpp.git] / sleekxmpp / plugins / xep_0235 / oauth.py
blobdf0e2ebf2da89700f383e5771f34376a33fc3ec4
1 """
2 SleekXMPP: The Sleek XMPP Library
3 Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout
4 This file is part of SleekXMPP.
6 See the file LICENSE for copying permission.
7 """
10 import logging
12 from sleekxmpp import Message
13 from sleekxmpp.plugins import BasePlugin
14 from sleekxmpp.xmlstream import register_stanza_plugin
15 from sleekxmpp.plugins.xep_0235 import stanza, OAuth
18 class XEP_0235(BasePlugin):
20 name = 'xep_0235'
21 description = 'XEP-0235: OAuth Over XMPP'
22 dependencies = set(['xep_0030'])
23 stanza = stanza
25 def plugin_init(self):
26 register_stanza_plugin(Message, OAuth)
28 def session_bind(self, jid):
29 self.xmpp['xep_0030'].add_feature('urn:xmpp:oauth:0')
31 def plugin_end(self):
32 self.xmpp['xep_0030'].del_feature(feature='urn:xmpp:oauth:0')