Package pyxmpp2 :: Package sasl :: Module scram :: Class SCRAMServerAuthenticator
[hide private]

Class SCRAMServerAuthenticator


Provides SCRAM SASL authentication for a server.
Nested Classes [hide private]

Inherited from core.ServerAuthenticator: __metaclass__

Instance Methods [hide private]
 
__init__(self, hash_name, channel_binding, password_database)
Initialize a SCRAMClientAuthenticator object.
 
start(self, properties, initial_response)
Start the authentication process.
Challenge or Success or Failure
response(self, response)
Process a response from a client.
 
_handle_first_response(self, response)
 
_handle_final_response(self, response)

Inherited from SCRAMOperations: H, HMAC, Hi

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

Static Methods [hide private]

Inherited from SCRAMOperations: Normalize, XOR, escape, unescape

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
  _abc_cache = <_weakrefset.WeakSet object at 0x7f7256def9d0>
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, hash_name, channel_binding, password_database)
(Constructor)

 
Initialize a SCRAMClientAuthenticator object.
Parameters:
  • hash_function_name (unicode) - hash function name, e.g. "SHA-1"
  • channel_binding (bool) - True to enable channel binding
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 response from a client.
Parameters:
  • response - the response from the client to our challenge.
Returns: Challenge or Success or Failure
a challenge, a success or a failure indicator.
Overrides: core.ServerAuthenticator.response
(inherited documentation)