o
    Df                     @   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  |||| || _|| _|| _d S N)super__init__stateredirect_uriredirect_fragment)selfdescriptionuristatus_coder   r	   r
   error	__class__ L/home/ubuntu/webapp/venv/lib/python3.10/site-packages/authlib/oauth2/base.pyr      s   
zOAuth2Error.__init__c                    s$   t   }| jr|d| jf |S )zGet a list of body.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 j|dS )Ni.   Location)r   )r	   r   r   r
   r   __call__)r   r   paramslocr   r   r   r      s
   zOAuth2Error.__call__)NNNNNFNr   )__name__
__module____qualname__r   r   r   __classcell__r   r   r   r   r      s    r   N)authlib.common.errorsr   authlib.common.urlsr   r   r   r   r   r   <module>   s    