
    h                     R    d dl mZ d dlmZ d Zd Zd Z	 ddlmZ y# e	$ r Y yw xY w)	    )import_module)settingsc                     t        | d      r| S t        | t              sJ | j                  dd      \  }}t	        t        |      |      S )N__call__.   )hasattr
isinstancestrrsplitgetattrr   )path_or_callablepackageattrs      U/var/www/html/ranktracker/api/venv/lib/python3.12/site-packages/dj_rest_auth/utils.pyimport_callabler      sL    ,*C000(//Q7}W-t44    c                 D    | j                   j                  |      \  }}|S )N)user)objectsget_or_create)token_modelr   
serializertoken_s        r   default_create_tokenr      s$    ""00d0;HE1Lr   c                     ddl m} t        t        di       }|j	                  d|      }t        |      }|j                  |       }|j                  |fS )Nr   )TokenObtainPairSerializerREST_AUTH_SERIALIZERSJWT_TOKEN_CLAIMS_SERIALIZER)$rest_framework_simplejwt.serializersr   r   r   getr   	get_tokenaccess_token)r   r   rest_auth_serializersJWTTokenClaimsSerializerTOPSrefreshs         r   
jwt_encoder)      sX    N#H.ErJ488%! 
 34DnnT"G((r   r   )JWTCookieAuthenticationN)
	importlibr   django.confr   r   r   r)   jwt_authr*   ImportError r   r   <module>r0      s4    #  5
)	1 		s    &&