Package pyxmpp :: Package sasl :: Module core :: Class ClientAuthenticator
[show private | hide private]
[frames | no frames]

Class ClientAuthenticator

Known Subclasses:
DigestMD5ClientAuthenticator, PlainClientAuthenticator

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.


Method Summary
  __init__(self, password_manager)
Initialize a ClientAuthenticator object.
Response or Failure challenge(self, challenge)
Process the server's challenge.
Success or Failure finish(self, data)
Handle authentication succes information from the server.
Response or Failure start(self, username, authzid)
Start the authentication process.

Method Details

__init__(self, password_manager)
(Constructor)

Initialize a ClientAuthenticator object.
Parameters:
password_manager - a password manager providing authentication credentials.
           (type=PasswordManager)

challenge(self, challenge)

Process the server's challenge.
Parameters:
challenge - the challenge.
           (type=str)
Returns:
the response or a failure indicator.
           (type=Response or Failure)

finish(self, data)

Handle authentication succes information from the server.
Parameters:
data - the optional additional data returned with the success.
           (type=str)
Returns:
success or failure indicator.
           (type=Success or Failure)

start(self, username, authzid)

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