Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/plugins/__pycache__/ |
Upload File : |
o �b� � @ sl d Z ddlmZ ddlmZ ddlmZ ddlmZm Z ddl mZ dZeeej �G dd � d ��Ze� Zd S )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 @ s, e Zd ZdZdZeZdZee fZ dd� ZdS )�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 C sp t � }|r6|�d�}t|�d rddlm} |d��tdt|�d�D ]}|| ||d }}|�||� q"|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�password� r �=/usr/lib/python3/dist-packages/twisted/plugins/cred_memory.py�generateChecker- s z&InMemoryCheckerFactory.generateCheckerN)�__name__� __module__�__qualname__�__doc__�authType�inMemoryCheckerFactoryHelp�authHelp�argStringFormatr r �credentialInterfacesr r r r r r s r N)r �zope.interfacer �twistedr �twisted.cred.checkersr �twisted.cred.credentialsr r r r r"