Package pyxmpp2 :: Package sasl :: Module core :: Class ClientAuthenticator
[hide private]

Class ClientAuthenticator


Base class for client authenticators.

A client authenticator class is a client-side implementation of a SASL mechanism. One ClientAuthenticator object may be used for one client authentication process.

Nested Classes [hide private]
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods [hide private]
 
__init__(self, password_manager)
Initialize a ClientAuthenticator object.
Response or Failure
start(self, username, authzid)
Start the authentication process.
Response or Failure
challenge(self, challenge)
Process the server's challenge.
Success or Failure
finish(self, data)
Handle authentication succes information from the server.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __abstractmethods__ = frozenset(['challenge', 'finish', 'start'])
  _abc_cache = <_weakrefset.WeakSet object at 0x88d152c>
  _abc_negative_cache = <_weakrefset.WeakSet object at 0x88d156c>
  _abc_negative_cache_version = 10
  _abc_registry = <_weakrefset.WeakSet object at 0x88d14cc>
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, password_manager)
(Constructor)

 
Initialize a ClientAuthenticator object.
Parameters:
  • password_manager (PasswordManager) - a password manager providing authentication credentials.
Overrides: object.__init__

start(self, username, authzid)

 
Start the authentication process.
Parameters:
  • username (unicode) - the username (authentication id).
  • authzid (unicode) - the authorization id requester.
Returns: Response or Failure
the initial response to send to the server or a failuer indicator.
Decorators:
  • @abstractmethod

challenge(self, challenge)

 
Process the server's challenge.
Parameters:
  • challenge (bytes) - the challenge.
Returns: Response or Failure
the response or a failure indicator.
Decorators:
  • @abstractmethod

finish(self, data)

 
Handle authentication succes information from the server.
Parameters:
  • data (bytes) - the optional additional data returned with the success.
Returns: Success or Failure
success or failure indicator.
Decorators:
  • @abstractmethod