home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 October / maximum-cd-2011-10.iso / DiscContents / digsby_setup.exe / lib / plugins / fbchat / fbsasl.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2011-06-22  |  1.4 KB  |  31 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. from pyxmpp.sasl.core import ClientAuthenticator
  5. from pyxmpp.sasl.core import Success, Response
  6. from util.net import WebFormData
  7.  
  8. class XFacebookPlatformClientAuthenticator(ClientAuthenticator):
  9.     
  10.     def __init__(self, password_manager, fbapi = None):
  11.         ClientAuthenticator.__init__(self, password_manager)
  12.         self.api = password_manager.owner.api
  13.  
  14.     
  15.     def start(self, ignored_username, ignored_authzid):
  16.         return Response()
  17.  
  18.     
  19.     def challenge(self, challenge):
  20.         in_params = WebFormData.parse(challenge, utf8 = True)
  21.         out_params = {
  22.             'nonce': in_params['nonce'].encode('utf-8') }
  23.         out_params = self.api.prepare_call(in_params['method'].encode('utf-8'), **out_params)
  24.         return Response(out_params)
  25.  
  26.     
  27.     def finish(self, data):
  28.         return Success(None)
  29.  
  30.  
  31.