/usr/lib/python3/dist-packages/twisted/cred/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/cred/__pycache__/checkers.cpython-310.pyc (10029B)
o
bI+ @ s d Z ddlZddlmZmZmZ ddlmZmZ ddl m
Z
ddlmZ ddl
mZ G dd d eZd
ZeeG dd dZeeG d
d dZeeG dd dZeZdS )zf
Basic credential checkers
@var ANONYMOUS: An empty tuple used to represent the anonymous avatar ID.
N) Attribute Interfaceimplementer)credentialserror)defer)Logger)failurec @ s e Zd ZdZedZdd ZdS )ICredentialsCheckerzE
An object that can check sub-interfaces of L{ICredentials}.
zNA list of sub-interfaces of L{ICredentials} which specifies which I may check.c C s dS )a
Validate credentials and produce an avatar ID.
@param credentials: something which implements one of the interfaces in
C{credentialInterfaces}.
@return: a L{Deferred} which will fire with a L{bytes} that identifies
an avatar, an empty tuple to specify an authenticated anonymous user
(provided as L{twisted.cred.checkers.ANONYMOUS}) or fail with
L{UnauthorizedLogin}. Alternatively, return the result itself.
@see: L{twisted.cred.credentials}
N )r r r 7/usr/lib/python3/dist-packages/twisted/cred/checkers.pyrequestAvatarId s z#ICredentialsChecker.requestAvatarIdN)__name__
__module____qualname____doc__r credentialInterfacesr
r r r r r
s r
r c @ s e Zd ZdZejfZdd ZdS )AllowAnonymousAccessz
A credentials checker that unconditionally grants anonymous access.
@cvar credentialInterfaces: Tuple containing L{IAnonymous}.
c C s
t tS )z
Succeed with the L{ANONYMOUS} avatar ID.
@return: L{Deferred} that fires with L{twisted.cred.checkers.ANONYMOUS}
)r succeed ANONYMOUSselfr r r r r
G s
z$AllowAnonymousAccess.requestAvatarIdN)r r r r r
IAnonymousr r
r r r r r = s r c @ s<