pyxmpp2.sasl.digest_md5.DigestMD5ClientAuthenticator

Package pyxmpp2 :: Package sasl :: Module digest_md5 :: Class DigestMD5ClientAuthenticator |
[hide private]

# Class DigestMD5ClientAuthenticator

Provides PLAIN SASL authentication for a client.

Nested Classes | [hide private]
Inherited from `core.ClientAuthenticator`: `__metaclass__`

Instance Methods | [hide private]
__init__(self, password_manager) Initialize a DigestMD5ClientAuthenticator object. |
sasl.Response or sasl.Failure |
start(self, username, authzid) Start the authentication process initializing client state. |
sasl.Response or sasl.Failure |
challenge(self, challenge) Process a challenge and return the response. |
_get_password(self) Retrieve user's password from the password manager. |
sasl.Response or sasl.Failure |
_make_response(self, charset, realms, nonce) Make a response for the first challenge from the server. |
`bytes` or Failure |
_get_realm(self, realms, charset) Choose a realm from the list specified by the server. |
sasl.Response or sasl.Failure |
_final_challenge(self, challenge) Process the second challenge from the server and return the response. |
sasl.Success or sasl.Failure |
finish(self, data) Process success indicator from the server. |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| _abc_cache = `<_weakrefset.WeakSet object at 0x87952cc>`
| _abc_negative_cache = `<_weakrefset.WeakSet object at 0x879526c>`
| _pyxmpp_sasl_preference = `50`
| _pyxmpp_sasl_secure = `70`
Inherited from `core.ClientAuthenticator`: `__abstractmethods__` Inherited from `core.ClientAuthenticator` (private): `_abc_negative_cache_version`, `_abc_registry`

Instance Variables | [hide private]
| password current authentication password
| pformat current authentication password format
| realm current authentication realm

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, password_manager) (Constructor) |
Initialize a DigestMD5ClientAuthenticator object. Parameters: `password_manager` (PasswordManager) - name of the password manager object providing authentication credentials. Overrides: object.__init__

### start(self, username, authzid) |
Start the authentication process initializing client state. Parameters: `username` (`unicode`) - username (authentication id). `authzid` (`unicode`) - authorization id. Returns: sasl.Response or sasl.Failure the (empty) initial response Overrides: core.ClientAuthenticator.start

### challenge(self, challenge) |
Process a challenge and return the response. Parameters: `challenge` (`bytes`) - the challenge from server. Returns: sasl.Response or sasl.Failure the response or a failure indicator. Overrides: core.ClientAuthenticator.challenge

### _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').

### _make_response(self, charset, realms, nonce) |
Make a response for the first challenge from the server. Parameters: `charset` (`bytes`) - charset name from the challenge. `realms` (`bytes`) - realms list from the challenge. `nonce` (`bytes`) - nonce value from the challenge. Returns: sasl.Response or sasl.Failure the response or a failure indicator.

### _get_realm(self, realms, charset) |
Choose a realm from the list specified by the server. Parameters: `realms` (`list` of `bytes`) - the realm list. `charset` (`bytes`) - encoding of realms on the list. Returns: `bytes` or Failure the realm chosen or a failure indicator.

### _final_challenge(self, challenge) |
Process the second challenge from the server and return the response. Parameters: `challenge` (`bytes`) - the challenge from server. Returns: sasl.Response or sasl.Failure the response or a failure indicator.

### finish(self, data) |
Process success indicator from the server. Process any addiitional data passed with the success. Fail if the server was not authenticated. Parameters: `data` (`bytes`) - an optional additional data with success. Returns: sasl.Success or sasl.Failure success or failure indicator. Overrides: core.ClientAuthenticator.finish