Package pyxmpp2 :: Package sasl :: Module core
[hide private]

Module core

Base classes for PyXMPP SASL implementation.

Normative reference:
Classes [hide private]
  PasswordManager
Base class for password managers.
  Reply
Base class for SASL authentication reply objects.
  Challenge
The challenge SASL message (server's challenge for the client).
  Response
The response SASL message (clients's reply the the server's challenge).
  Failure
The failure SASL message.
  Success
The success SASL message (sent by the server on authentication success).
  ClientAuthenticator
Base class for client authenticators.
  ServerAuthenticator
Base class for server authenticators.
Functions [hide private]
 
_key_func(item)
Key function used for sorting SASL authenticator classes
 
_register_client_authenticator(klass, name)
Add a client authenticator class to CLIENT_MECHANISMS_D, CLIENT_MECHANISMS and, optionally, to SECURE_CLIENT_MECHANISMS
 
_register_server_authenticator(klass, name)
Add a client authenticator class to SERVER_MECHANISMS_D, SERVER_MECHANISMS and, optionally, to SECURE_SERVER_MECHANISMS
 
sasl_mechanism(name, secure, preference=50)
Class decorator generator for ClientAuthenticator or ServerAuthenticator subclasses.
Variables [hide private]
  CLIENT_MECHANISMS_D = {'DIGEST-MD5': <class 'pyxmpp2.sasl.dige...
  CLIENT_MECHANISMS = ['DIGEST-MD5', 'PLAIN', 'EXTERNAL']
  SECURE_CLIENT_MECHANISMS = ['DIGEST-MD5', 'PLAIN']
  SERVER_MECHANISMS_D = {'DIGEST-MD5': <class 'pyxmpp2.sasl.dige...
  SERVER_MECHANISMS = ['DIGEST-MD5', 'PLAIN']
  SECURE_SERVER_MECHANISMS = ['DIGEST-MD5', 'PLAIN']
Function Details [hide private]

sasl_mechanism(name, secure, preference=50)

 
Class decorator generator for ClientAuthenticator or ServerAuthenticator subclasses. Adds the class to the pyxmpp.sasl mechanism registry.
Parameters:
  • name (unicode) - SASL mechanism name
  • secure (bool) - if the mechanims can be considered secure - True if it can be used over plain-text channel
  • preference (int) - mechanism preference level (the higher the better)

Variables Details [hide private]

CLIENT_MECHANISMS_D

Value:
{'DIGEST-MD5': <class 'pyxmpp2.sasl.digest_md5.DigestMD5ClientAuthenti\
cator'>,
 'EXTERNAL': <class 'pyxmpp2.sasl.external.ExternalClientAuthenticator\
'>,
 'PLAIN': <class 'pyxmpp2.sasl.plain.PlainClientAuthenticator'>}

SERVER_MECHANISMS_D

Value:
{'DIGEST-MD5': <class 'pyxmpp2.sasl.digest_md5.DigestMD5ServerAuthenti\
cator'>,
 'PLAIN': <class 'pyxmpp2.sasl.plain.PlainServerAuthenticator'>}