Package pyxmpp2 :: Package sasl
[hide private]

Package sasl

SASL authentication implementaion for PyXMPP.

Normative reference:
Submodules [hide private]

Functions [hide private]
sasl.core.ClientAuthenticator
client_authenticator_factory(mechanism)
Create a client authenticator object for given SASL mechanism.
sasl.core.ServerAuthenticator
server_authenticator_factory(mechanism, password_database)
Create a server authenticator object for given SASL mechanism and password databaser.
list of unicode
filter_mechanism_list(mechanisms, properties, allow_insecure=False, server_side=False)
Filter a mechanisms list only to include those mechanisms that cans succeed with the provided properties and are secure enough.
Variables [hide private]
  logger = logging.getLogger("pyxmpp2.sasl")
Function Details [hide private]

client_authenticator_factory(mechanism)

 
Create a client authenticator object for given SASL mechanism.
Parameters:
  • mechanism (unicode) - name of the SASL mechanism ("PLAIN", "DIGEST-MD5" or "GSSAPI").
Returns: sasl.core.ClientAuthenticator
new authenticator.
Raises:
  • KeyError - if no client authenticator is available for this mechanism

server_authenticator_factory(mechanism, password_database)

 
Create a server authenticator object for given SASL mechanism and password databaser.
Parameters:
  • mechanism (str) - name of the SASL mechanism ("PLAIN", "DIGEST-MD5" or "GSSAPI").
  • password_database (PasswordDatabase) - name of the password database object to be used for authentication credentials verification.
Returns: sasl.core.ServerAuthenticator
new authenticator.
Raises:
  • KeyError - if no server authenticator is available for this mechanism

filter_mechanism_list(mechanisms, properties, allow_insecure=False, server_side=False)

 
Filter a mechanisms list only to include those mechanisms that cans succeed with the provided properties and are secure enough.
Parameters:
  • mechanisms (sequence of unicode) - list of the mechanisms names
  • properties (mapping) - available authentication properties
  • allow_insecure (bool) - allow insecure mechanisms
Returns: list of unicode