Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/plugins/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/plugins/cred_memory.pyc

ó
[³XMc@s…dZddlmZddlmZddlmZddlmZddl	m
Z
mZdZde
fd	„ƒYZeƒZd
S(s-
Cred plugin for an in-memory user database.
iÿÿÿÿ(t
implements(tplugin(tICheckerFactory(t'InMemoryUsernamePasswordDatabaseDontUse(tIUsernamePasswordtIUsernameHashedPasswordsñ
A checker that uses an in-memory user database.

This is only of use in one-off test programs or examples which
don't want to focus too much on how credentials are verified. You
really don't want to use this for anything else. It is a toy.
tInMemoryCheckerFactorycBsEeZdZeeejƒdZeZ	dZ
eefZ
d„ZRS(s‚
    A factory for in-memory credentials checkers.

    This is only of use in one-off test programs or examples which don't
    want to focus too much on how credentials are verified.

    You really don't want to use this for anything else.  It is, at best, a
    toy.  If you need a simple credentials checker for a real application,
    see L{cred_passwd.PasswdCheckerFactory}.
    tmemorys*A colon-separated list (name:password:...)cCs tƒ}|rœ|jdƒ}t|ƒdrMddlm}|dƒ‚nxLtdt|ƒdƒD]/}||||d}}|j||ƒqfWn|S(s
        This checker factory expects to get a list of
        username:password pairs, with each pair also separated by a
        colon. For example, the string 'alice:f:bob:g' would generate
        two users, one named 'alice' and one named 'bob'.
        t:iiÿÿÿÿ(tInvalidAuthArgumentStrings#argstring must be in format U:P:...ii(Rtsplittlenttwisted.cred.strcredR	trangetaddUser(tselft	argstringtcheckertpiecesR	titusernametpassword((s?/usr/lib/python2.7/dist-packages/twisted/plugins/cred_memory.pytgenerateChecker/s	(t__name__t
__module__t__doc__RRRtIPlugintauthTypetinMemoryCheckerFactoryHelptauthHelptargStringFormatRRtcredentialInterfacesR(((s?/usr/lib/python2.7/dist-packages/twisted/plugins/cred_memory.pyRs
	N(Rtzope.interfaceRttwistedRRRttwisted.cred.checkersRttwisted.cred.credentialsRRRtobjectRttheInMemoryCheckerFactory(((s?/usr/lib/python2.7/dist-packages/twisted/plugins/cred_memory.pyt<module>s
'