Package pyxmpp2 :: Package sasl :: Module digest_md5 :: Class DigestMD5ServerAuthenticator
[hide private]

Class DigestMD5ServerAuthenticator


Provides DIGEST-MD5 SASL authentication for a server.

Authentication properties used:

Authentication properties returned:

Nested Classes [hide private]

Inherited from core.ServerAuthenticator: __metaclass__

Instance Methods [hide private]
 
__init__(self, password_database)
Initialize a DigestMD5ServerAuthenticator object.
 
start(self, properties, initial_response)
Start the authentication process.
sasl.Challenge, sasl.Success or sasl.Failure
response(self, response)
Process a client reponse.
sasl.Challenge, sasl.Success or sasl.Failure
_parse_response(self, response)
Parse a client reponse and pass to further processing.
sasl.Challenge, sasl.Success or sasl.Failure
_check_params(self, username, realm, cnonce, digest_uri, response_val, authzid, nonce_count)
Check parameters of a client reponse and pass them to further processing.
sasl.Success or sasl.Failure
_make_final_challenge(self, username, realm, cnonce, digest_uri, response_val, authzid, nonce_count)
Send the second challenge in reply to the client response.

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

Class Methods [hide private]

Inherited from core.ServerAuthenticator: are_properties_sufficient

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
  _abc_cache = <_weakrefset.WeakSet object at 0x9d32bac>
  _pyxmpp_sasl_preference = 50
  _pyxmpp_sasl_secure = 70
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, password_database)
(Constructor)

 
Initialize a DigestMD5ServerAuthenticator object.
Parameters:
  • password_database - a password database
Overrides: object.__init__

start(self, properties, initial_response)

 
Start the authentication process.

:Parameters:
    - `properties`: the `authentication properties`_
    - `initial_response`: the initial response send by the client with
      the authentication request.

:Types:
    - `properties`: mapping
    - `initial_response`: `bytes`

:return: a challenge, a success or a failure indicator.
:returntype: `Challenge` or `Failure` or `Success`

Overrides: core.ServerAuthenticator.start
(inherited documentation)

response(self, response)

 
Process a client reponse.
Parameters:
  • response (bytes) - the response from the client.
Returns: sasl.Challenge, sasl.Success or sasl.Failure
a challenge, a success indicator or a failure indicator.
Overrides: core.ServerAuthenticator.response

_parse_response(self, response)

 
Parse a client reponse and pass to further processing.
Parameters:
  • response (bytes) - the response from the client.
Returns: sasl.Challenge, sasl.Success or sasl.Failure
a challenge, a success indicator or a failure indicator.

_check_params(self, username, realm, cnonce, digest_uri, response_val, authzid, nonce_count)

 
Check parameters of a client reponse and pass them to further processing.
Parameters:
  • username (bytes) - user name.
  • realm (bytes) - realm.
  • cnonce (bytes) - cnonce value.
  • digest_uri (bytes) - digest-uri value.
  • response_val (bytes) - response value computed by the client.
  • authzid (bytes) - authorization id.
  • nonce_count (bytes) - nonce count value.
Returns: sasl.Challenge, sasl.Success or sasl.Failure
a challenge, a success indicator or a failure indicator.

_make_final_challenge(self, username, realm, cnonce, digest_uri, response_val, authzid, nonce_count)

 
Send the second challenge in reply to the client response.
Parameters:
  • username (bytes) - user name.
  • realm (bytes) - realm.
  • cnonce (bytes) - cnonce value.
  • digest_uri (bytes) - digest-uri value.
  • response_val (bytes) - response value computed by the client.
  • authzid (bytes) - authorization id.
  • nonce_count (bytes) - nonce count value.
Returns: sasl.Success or sasl.Failure
a challenge, a success indicator or a failure indicator.