ϪfdZddlZddlmZddlmZddlmZddlm Z m Z ddl m Z dZ d Zee ejGd d ZeZy) z; Cred plugin for a file of the format 'username:password'. N) implementer)plugin)FilePasswordDB)IUsernameHashedPasswordIUsernamePassword)ICheckerFactoryz This checker expects to receive the location of a file that conforms to the FilePasswordDB format. Each line in the file should be of the format 'username:password', in plain text. zWarning: not a valid filecBeZdZdZdZeZdZee fZ e jZ dZy)FileCheckerFactoryz7 A factory for instances of L{FilePasswordDB}. filez,Location of a FilePasswordDB-formatted file.cddlm}|jstd|jz||j s%|j jtd|dt|S)z This checker factory expects to get the location of a file. The file should conform to the format required by L{FilePasswordDB} (using defaults for all initialization parameters). r)FilePathz%r requires a filenamez:  ) twisted.python.filepathr strip ValueErrorauthTypeisfile errorOutputwriteinvalidFileWarningr)self argstringr s ;/usr/lib/python3/dist-packages/twisted/plugins/cred_file.pygenerateCheckerz"FileCheckerFactory.generateChecker+se 5 5 EF F)$++-    " "&8%9I;b#I Ji((N)__name__ __module__ __qualname____doc__rfileCheckerFactoryHelpauthHelpargStringFormatrrcredentialInterfacessysstderrrrrrr r s2H%HDO-/FG**K )rr )rr$zope.interfacertwistedrtwisted.cred.checkersrtwisted.cred.credentialsrrtwisted.cred.strcredrr rIPluginr theFileCheckerFactoryr&rrr.s]   &0O0 1 _fnn-)).):+,r