
    \d                         d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	m
Z
 ddlmZ dZd	Z eeej                   G d
 d                      Z e            ZdS )z;
Cred plugin for a file of the format 'username:password'.
    N)implementer)plugin)FilePasswordDB)IUsernameHashedPasswordIUsernamePassword)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.
zWarning: not a valid filec                   :    e Zd ZdZdZeZdZee	fZ
ej        Zd ZdS )FileCheckerFactoryz7
    A factory for instances of L{FilePasswordDB}.
    filez,Location of a FilePasswordDB-formatted file.c                    ddl m} |                                st          d| j        z             ||                                          s%| j                            t           d| d           t          |          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
ValueErrorauthTypeisfileerrorOutputwriteinvalidFileWarningr   )self	argstringr   s      9lib/python3.11/site-packages/twisted/plugins/cred_file.pygenerateCheckerz"FileCheckerFactory.generateChecker+   s     	544444   	K5EFFF)$$++-- 	K""&8#I#II#I#I#IJJJi(((    N)__name__
__module____qualname____doc__r   fileCheckerFactoryHelpauthHelpargStringFormatr   r   credentialInterfacessysstderrr   r    r   r   r
   r
      sQ          H%HDO-/FG*K) ) ) ) )r   r
   )r   r$   zope.interfacer   twistedr   twisted.cred.checkersr   twisted.cred.credentialsr   r   twisted.cred.strcredr   r    r   IPluginr
   theFileCheckerFactoryr&   r   r   <module>r.      s    
 


 & & & & & &       0 0 0 0 0 0 O O O O O O O O 0 0 0 0 0 0  1  _fn--) ) ) ) ) ) ) .-): +*,,   r   