o
    ÿÑÐb-  ã                   @   s,   d dl mZ d dlmZ G dd„ deƒZdS )é    )ÚAuthlibHTTPError)Úadd_params_to_uric                       s>   e Zd Z			d	‡ fdd„	Z‡ fdd„Zd
‡ fdd„	Z‡  ZS )ÚOAuth2ErrorNFc                    s,   t t| ƒ ||||¡ || _|| _|| _d S )N)Úsuperr   Ú__init__ÚstateÚredirect_uriÚredirect_fragment)ÚselfÚdescriptionÚuriÚstatus_coder   r   r	   Úerror©Ú	__class__© úR/var/www/secure340b-portal/env/lib/python3.10/site-packages/authlib/oauth2/base.pyr      s   
zOAuth2Error.__init__c                    s(   t t| ƒ ¡ }| jr| d| jf¡ |S )zGet a list of body.r   )r   r   Úget_bodyr   Úappend)r
   r   r   r   r   r      s   zOAuth2Error.get_bodyc                    s@   | j r|  ¡ }t| j || jƒ}ddd|fgfS tt| ƒ ||¡S )Ni.  Ú ZLocation)r   r   r   r	   r   r   Ú__call__)r
   ZtranslationsZ
error_urisÚparamsÚlocr   r   r   r      s   
ÿzOAuth2Error.__call__)NNNNNFN)NN)Ú__name__Ú
__module__Ú__qualname__r   r   r   Ú__classcell__r   r   r   r   r      s    þr   N)Zauthlib.common.errorsr   Zauthlib.common.urlsr   r   r   r   r   r   Ú<module>   s    