| Home | Trees | Index | Help |
|
|---|
| Package pyxmpp :: Package sasl :: Module digest_md5 :: Class DigestMD5ClientAuthenticator |
|
ClientAuthenticator --+
|
DigestMD5ClientAuthenticator
Provides PLAIN SASL authentication for a client.
:Ivariables:
- `password`: current authentication password
- `pformat`: current authentication password format
- `realm`: current authentication realm
| Method Summary | |
|---|---|
Initialize a `DigestMD5ClientAuthenticator` object. | |
Process a challenge and return the response. | |
Process success indicator from the server. | |
Start the authentication process initializing client state. | |
Process the second challenge from the server and return the response. | |
Retrieve user's password from the password manager. | |
Choose a realm from the list specified by the server. | |
Make a response for the first challenge from the server. | |
| Method Details |
|---|
__init__(self,
password_manager)
|
challenge(self, challenge)
Process a challenge and return the response.
:Parameters:
- `challenge`: the challenge from server.
:Types:
- `challenge`: `str`
:return: the response or a failure indicator.
:returntype: `sasl.Response` or `sasl.Failure`
|
finish(self, data)
Process success indicator from the server.
Process any addicional data passed with the success.
Fail if the server was not authenticated.
:Parameters:
- `data`: an optional additional data with success.
:Types:
- `data`: `str`
:return: success or failure indicator.
:returntype: `sasl.Success` or `sasl.Failure`
|
start(self, username, authzid)
Start the authentication process initializing client state.
:Parameters:
- `username`: username (authentication id).
- `authzid`: authorization id.
:Types:
- `username`: `unicode`
- `authzid`: `unicode`
:return: the (empty) initial response
:returntype: `sasl.Response` or `sasl.Failure`
|
_final_challenge(self, challenge)
Process the second challenge from the server and return the response.
:Parameters:
- `challenge`: the challenge from server.
:Types:
- `challenge`: `str`
:return: the response or a failure indicator.
:returntype: `sasl.Response` or `sasl.Failure`
|
_get_password(self)
Retrieve user's password from the password manager.
Set `self.password` to the password and `self.pformat`
to its format name ('plain' or 'md5:user:realm:pass').
|
_get_realm(self, realms, charset)
Choose a realm from the list specified by the server.
:Parameters:
- `realms`: the realm list.
- `charset`: encoding of realms on the list.
:Types:
- `realms`: `list` of `str`
- `charset`: `str`
:return: the realm chosen or a failure indicator.
:returntype: `str` or `Failure`
|
_make_response(self, charset, realms, nonce)
Make a response for the first challenge from the server.
:Parameters:
- `charset`: charset name from the challenge.
- `realms`: realms list from the challenge.
- `nonce`: nonce value from the challenge.
:Types:
- `charset`: `str`
- `realms`: `str`
- `nonce`: `str`
:return: the response or a failure indicator.
:returntype: `sasl.Response` or `sasl.Failure`
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Wed May 31 22:37:03 2006 | http://epydoc.sf.net |