o
    ^[2h%  ã                   @   s   d dl Z G dd„ deƒZdS )é    Nc                       s2   e Zd Z‡ fdd„Zddd„Zedd„ ƒZ‡  ZS )	ÚOAuth2Tokenc                    sR   |  d¡rt|d ƒ|d< n|  d¡r!tt ¡ ƒt|d ƒ |d< tƒ  |¡ d S )NÚ
expires_atÚ
expires_in)ÚgetÚintÚtimeÚsuperÚ__init__)ÚselfÚparams©Ú	__class__© úp/home/skpark/git/infrasmart_work/infrasmart/venv/lib/python3.10/site-packages/authlib/oauth2/rfc6749/wrappers.pyr	      s
   

zOAuth2Token.__init__é<   c                 C   s&   |   d¡}|s	d S || }|t ¡ k S )Nr   )r   r   )r
   Úleewayr   Úexpiration_thresholdr   r   r   Ú
is_expired   s
   
zOAuth2Token.is_expiredc                 C   s    t |tƒrt || ƒs| |ƒ}|S )N)Ú
isinstanceÚdict)ÚclsÚtokenr   r   r   Ú	from_dict   s   zOAuth2Token.from_dict)r   )Ú__name__Ú
__module__Ú__qualname__r	   r   Úclassmethodr   Ú__classcell__r   r   r   r   r      s
    
r   )r   r   r   r   r   r   r   Ú<module>   s    