�
Ϫ�f� � �� � d Z ddlmZmZmZmZmZmZmZ ddl m
Z
mZ ddlm
Z
ddlmZ ddlmZ ddlmZ ddlmZmZ dd lmZmZ ee
Zeeeeg d
f f Z G d� de
� Z G d
� d� Zy
)z=
The point of integration of application and authentication.
� )�Callable�Dict�Iterable�List�Tuple�Type�Union)� Interface�
providedBy)�error)�ICredentialsChecker)�ICredentials)�defer)�Deferred�
maybeDeferred)�failure�reflectNc
�H � e Zd ZdZdeeed f dededee e
e
f fd�Zy) �IRealmz[
The realm connects application-specific objects to the
authentication system.
�avatarId� �mind�
interfaces�returnc � � y)a�
Return avatar which provides one of the given interfaces.
@param avatarId: a string that identifies an avatar, as returned by
L{ICredentialsChecker.requestAvatarId<twisted.cred.checkers.ICredentialsChecker.requestAvatarId>}
(via a Deferred). Alternatively, it may be
C{twisted.cred.checkers.ANONYMOUS}.
@param mind: usually None. See the description of mind in
L{Portal.login}.
@param interfaces: the interface(s) the returned avatar should
implement, e.g. C{IMailAccount}. See the description of
L{Portal.login}.
@returns: a deferred which will fire a tuple of (interface,
avatarAspect, logout), or the tuple itself. The interface will be
one of the interfaces passed in the 'interfaces' argument. The
'avatarAspect' will implement that interface. The 'logout' object
is a callable which will detach the mind from the avatar.
Nr )r r r s �5/usr/lib/python3/dist-packages/twisted/cred/portal.py�
requestAvatarzIRealm.requestAvatar) s � � N)�__name__�
__module__�__qualname__�__doc__r �bytesr �object�_InterfaceItselfr �_requestResultr r r r r r # sI � ��
���u�R�y�(�)��17��FV�� �x��'��7� 8�r r c � � e Zd ZU dZeee ef ed< |