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.
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
):
21 description
= 'XEP-0235: OAuth Over XMPP'
22 dependencies
= set(['xep_0030'])
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')
32 self
.xmpp
['xep_0030'].del_feature(feature
='urn:xmpp:oauth:0')