Package pyxmpp2 :: Package test :: Module sasl__gsasl :: Class PasswordDatabase
[hide private]

Class PasswordDatabase


Nested Classes [hide private]

Inherited from sasl.core.PasswordDatabase: __metaclass__

Instance Methods [hide private]
 
__init__(self, username, password, realms=None)
x.__init__(...) initializes x; see help(type(x)) for signature
unicode,`unicode` tuple.
get_password(self, username, acceptable_formats, properties)
Get the password for user authentication.

Inherited from sasl.core.PasswordDatabase: check_password

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

Class Variables [hide private]
  _abc_negative_cache_version = 28

Inherited from sasl.core.PasswordDatabase: __abstractmethods__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, username, password, realms=None)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

get_password(self, username, acceptable_formats, properties)

 

Get the password for user authentication.

By default returns (None, None) providing no password. Should be overridden in derived classes unless only check_password functionality is available.

Parameters:
  • username - the username for which the password is requested.
  • acceptable_formats - a sequence of acceptable formats of the password data. Could be "plain" (plain text password), "md5:user:realm:password" (MD5 hex digest of user:realm:password) or any other mechanism-specific encoding. This allows non-plain-text storage of passwords. But only "plain" format will work with all password authentication mechanisms.
  • properties - mapping with authentication properties (those provided to the authenticator's start() method plus some already obtained via the mechanism).
Returns: unicode,`unicode` tuple.
the password and its encoding (format).
Overrides: sasl.core.PasswordDatabase.get_password
(inherited documentation)