-í Û„?csKdZdkZdkZdfd„ƒYZd„Zdfd„ƒYZdS(s¥Base classes for defining an authentication protocol. Database -- abstract base class for password database Client -- abstract base class for authentication client NsClientcstZgZd„ZRS(Ncs@||_x0|iD]%}t|i||ii|ƒƒqWdS(N(sstubsselfs extensionssmssetattrsextensionMethod(sselfsstubsm((s5/usr/pkg/lib/python2.2/site-packages/ZEO/auth/base.pys__init__s  (s__name__s __module__s extensionss__init__(((s5/usr/pkg/lib/python2.2/site-packages/ZEO/auth/base.pysClientscs|iƒ|SdS(s#Sort a list in-place and return it.N(sLssort(sL((s5/usr/pkg/lib/python2.2/site-packages/ZEO/auth/base.pyssort!s sDatabasecsetZdZed„Zed„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z RS( sgAbstracts a password database. This class is used both in the authentication process (via get_password()) and by client scripts that manage the password database file. The password file is a simple, colon-separated text file mapping usernames to password hashes. The hashes are SHA hex digests produced from the password string. cs)h|_||_||_|iƒdS(s2Creates a new Database filename: a string containing the full pathname of the password database file. Must be readable by the user running ZEO. Must be writeable by any client script that accesses the database. realm: the realm name (a string) N(sselfs_userssfilenamesrealmsload(sselfsfilenamesrealm((s5/usr/pkg/lib/python2.2/site-packages/ZEO/auth/base.pys__init__2s    c s„|i}| ot|dƒ}n|io|dI|iIJnx8t|iiƒƒD]!}|d||i|fIJq[WdS(Nswsrealms%s: %s( sselfsfilenamesfdsopensrealmssorts_usersskeyssusername(sselfsfdsusernamesfilename((s5/usr/pkg/lib/python2.2/site-packages/ZEO/auth/base.pyssaveAs  csÓ|i}| odSntii|ƒ odSnt|ƒ}|iƒ}|di dƒo,|i dƒi ƒ}|t dƒ|_nx?|D]7}|i ƒiddƒ\}}|i ƒ|i|