Ë
    æï7i¯  ã                   óp   — d dl mZmZmZmZ d dlmZ d dlm	Z	 d dl
mZ ddlmZ erddlmZ  G d„ d	«      Zy
)é    )ÚTYPE_CHECKINGÚAnyÚOptionalÚUnion)Úmodels)ÚEmptyManager)Úcached_propertyé   )Úapi_settings)ÚTokenc                   óZ  — e Zd ZdZdZ eej                  «      Z eej                  «      Z
d%d„Zdefd„Zedefd„«       Zedefd„«       Zedefd	„«       Zedefd
„«       Zedefd„«       Zdedefd„Zdedefd„Zdefd„Zd&d„Zd&d„Zdeddfd„Zdeddfd„Zedej                  fd„«       Zedej                  fd„«       Z d'de!e   de"fd„Z#d'de!e   de"fd„Z$d'dede!e   defd„Z%d'de&e   de!e   defd„Z'dedefd„Z(edefd „«       Z)edefd!„«       Z*defd"„Z+d#ede!e,   fd$„Z-y)(Ú	TokenUseraÒ  
    A dummy user class modeled after django.contrib.auth.models.AnonymousUser.
    Used in conjunction with the `JWTStatelessUserAuthentication` backend to
    implement single sign-on functionality across services which share the same
    secret key.  `JWTStatelessUserAuthentication` will return an instance of this
    class instead of a `User` model instance.  Instances of this class act as
    stateless user objects which are backed by validated tokens.
    TÚreturnNc                 ó   — || _         y ©N)Útoken)Úselfr   s     úr/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/rest_framework_simplejwt/models.pyÚ__init__zTokenUser.__init__   s	   € Øˆ�
ó    c                 ó    — d| j                   › �S )Nz
TokenUser ©Úid©r   s    r   Ú__str__zTokenUser.__str__!   s   € Ø˜DŸG™G˜9Ð%Ð%r   c                 ó<   — | j                   t        j                     S r   )r   r   ÚUSER_ID_CLAIMr   s    r   r   zTokenUser.id$   s   € à�z‰zœ,×4Ñ4Ñ5Ð5r   c                 ó   — | j                   S r   r   r   s    r   ÚpkzTokenUser.pk(   s   € à�w‰wˆr   c                 ó:   — | j                   j                  dd«      S )NÚusernameÚ ©r   Úgetr   s    r   r!   zTokenUser.username,   s   € à�z‰z�~‰~˜j¨"Ó-Ð-r   c                 ó:   — | j                   j                  dd«      S )NÚis_staffFr#   r   s    r   r&   zTokenUser.is_staff0   s   € à�z‰z�~‰~˜j¨%Ó0Ð0r   c                 ó:   — | j                   j                  dd«      S )NÚis_superuserFr#   r   s    r   r(   zTokenUser.is_superuser4   s   € à�z‰z�~‰~˜n¨eÓ4Ð4r   Úotherc                 ó`   — t        |t        «      st        S | j                  |j                  k(  S r   )Ú
isinstancer   ÚNotImplementedr   ©r   r)   s     r   Ú__eq__zTokenUser.__eq__8   s%   € Ü˜%¤Ô+Ü!Ð!Ø�w‰w˜%Ÿ(™(Ñ"Ð"r   c                 ó&   — | j                  |«       S r   )r.   r-   s     r   Ú__ne__zTokenUser.__ne__=   s   € Ø—;‘;˜uÓ%Ð%Ð%r   c                 ó,   — t        | j                  «      S r   )Úhashr   r   s    r   Ú__hash__zTokenUser.__hash__@   s   € Ü�D—G‘G‹}Ðr   c                 ó   — t        d«      ‚©Nz%Token users have no DB representation©ÚNotImplementedErrorr   s    r   ÚsavezTokenUser.saveC   ó   € Ü!Ð"IÓJÐJr   c                 ó   — t        d«      ‚r5   r6   r   s    r   ÚdeletezTokenUser.deleteF   r9   r   Úraw_passwordc                 ó   — t        d«      ‚r5   r6   ©r   r<   s     r   Úset_passwordzTokenUser.set_passwordI   r9   r   c                 ó   — t        d«      ‚r5   r6   r>   s     r   Úcheck_passwordzTokenUser.check_passwordL   r9   r   c                 ó   — | j                   S r   )Ú_groupsr   s    r   ÚgroupszTokenUser.groupsO   s   € à�|‰|Ðr   c                 ó   — | j                   S r   )Ú_user_permissionsr   s    r   Úuser_permissionszTokenUser.user_permissionsS   s   € à×%Ñ%Ð%r   Úobjc                 ó   — t        «       S r   ©Úset©r   rH   s     r   Úget_group_permissionszTokenUser.get_group_permissionsW   ó	   € Ü‹uˆr   c                 ó   — t        «       S r   rJ   rL   s     r   Úget_all_permissionszTokenUser.get_all_permissionsZ   rN   r   Úpermc                  ó   — y©NF© )r   rQ   rH   s      r   Úhas_permzTokenUser.has_perm]   ó   € Ør   Ú	perm_listc                  ó   — yrS   rT   )r   rW   rH   s      r   Ú	has_permszTokenUser.has_perms`   rV   r   Úmodulec                  ó   — yrS   rT   )r   rZ   s     r   Úhas_module_permszTokenUser.has_module_permsc   rV   r   c                  ó   — yrS   rT   r   s    r   Úis_anonymouszTokenUser.is_anonymousf   s   € àr   c                  ó   — y)NTrT   r   s    r   Úis_authenticatedzTokenUser.is_authenticatedj   s   € àr   c                 ó   — | j                   S r   )r!   r   s    r   Úget_usernamezTokenUser.get_usernamen   s   € Ø�}‰}Ðr   Úattrc                 ó:   — | j                   j                  |d«      S )zVThis acts as a backup attribute getter for custom claims defined in Token serializers.Nr#   )r   rc   s     r   Ú__getattr__zTokenUser.__getattr__q   s   € à�z‰z�~‰~˜d DÓ)Ð)r   )r   r   r   N)r   Nr   ).Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	is_activer   Úauth_modelsÚGrouprC   Ú
PermissionrF   r   Ústrr   r	   r   r   r!   Úboolr&   r(   Úobjectr.   r0   Úintr3   r8   r;   r?   rA   ÚpropertyrD   rG   r   rK   rM   rP   rU   ÚlistrY   r\   r^   r`   rb   r   re   rT   r   r   r   r      sQ  „ ñð €Iá˜;×,Ñ,Ó-€GÙ$ [×%;Ñ%;Ó<Ðóð&˜ó &ð ð6�Cò 6ó ð6ð ð�Cò ó ðð ð.˜#ò .ó ð.ð ð1˜$ò 1ó ð1ð ð5˜dò 5ó ð5ð#˜Fð # tó #ð
&˜Fð & tó &ð˜#ó óKóKðK¨ð K°ó KðK¨3ð K°4ó Kð ð˜×)Ñ)ò ó ðð ð& +×"8Ñ"8ò &ó ð&ñ¨°&Ñ)9ð ÀSó ñ x°Ñ'7ð À3ó ñ˜Sð  x°Ñ'7ð À4ó ñ 4¨¡9ð °8¸FÑ3Cð Ètó ð sð ¨tó ð ð˜dò ó ðð ð $ò ó ðð˜có ð* ð *¨°©ô *r   r   N)Útypingr   r   r   r   Údjango.contrib.authr   rk   Údjango.db.models.managerr   Údjango.utils.functionalr	   Úsettingsr   Útokensr   r   rT   r   r   Ú<module>rz      s)   ðß 6Ó 6å 5Ý 1Ý 3å "áÝ÷f*ò f*r   