Package common :: Package xmpp :: Module auth_nb :: Class SASL
[hide private]
[frames] | no frames]

Class SASL

source code


Implements SASL authentication. Can be plugged into NonBlockingClient to start authentication.
Instance Methods [hide private]
 
__init__(self, username, password, on_sasl) source code
 
plugin(self, owner) source code
 
plugout(self)
Remove SASL handlers from owner's dispatcher.
source code
 
auth(self)
Start authentication.
source code
 
FeaturesHandler(self, conn, feats)
Used to determine if server supports SASL auth.
source code
 
MechanismHandler(self) source code
 
SASLHandler(self, conn, challenge)
Perform next SASL auth step.
source code

Inherited from client.PlugIn: PlugIn, PlugOut

Method Details [hide private]

__init__(self, username, password, on_sasl)
(Constructor)

source code 
Parameters:
  • user - XMPP username
  • password - XMPP password
  • on_sasl - Callback, will be called after each SASL auth-step.
Overrides: client.PlugIn.__init__

plugin(self, owner)

source code 

plugout(self)

source code 
Remove SASL handlers from owner's dispatcher. Used internally.

auth(self)

source code 

Start authentication. Result can be obtained via "SASL.startsasl" attribute and will be either SASL_SUCCESS or SASL_FAILURE.

Note that successfull auth will take at least two Dispatcher.Process() calls.

FeaturesHandler(self, conn, feats)

source code 
Used to determine if server supports SASL auth. Used internally.

MechanismHandler(self)

source code 

SASLHandler(self, conn, challenge)

source code 
Perform next SASL auth step. Used internally.