
    Ld3	                        d Z ddlmZ ddlmZ  G d de          Z G d de          Z G d d	e          Z G d
 de          Z G d de          Z	 G d de          Z
 G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          ZdS )a  
    authlib.oauth1.rfc5849.errors
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    RFC5849 has no definition on errors. This module is designed by
    Authlib based on OAuth 1.0a `Section 10`_ with some changes.

    .. _`Section 10`: https://oauth.net/core/1.0a/#rfc.section.10
    )AuthlibHTTPErroris_secure_transportc                   &     e Zd Zd fd	Zd Z xZS )OAuth1ErrorNc                 ^    t          t          |                               d |||           d S N)superr   __init__)selfdescriptionuristatus_code	__class__s       CF:\djangOuth\env\Lib\site-packages\authlib/oauth1/rfc5849/errors.pyr   zOAuth1Error.__init__   s-    k4  ))$S+NNNNN    c                 
    g dS )zGet a list of headers.))zContent-Typez!application/x-www-form-urlencoded)zCache-Controlzno-store)Pragmazno-cache )r   s    r   get_headerszOAuth1Error.get_headers   s    
 
 
 	
r   )NNN)__name__
__module____qualname__r   r   __classcell__r   s   @r   r   r      sR        O O O O O O
 
 
 
 
 
 
r   r   c                   ,    e Zd ZdZdZed             ZdS )InsecureTransportErrorinsecure_transportzOAuth 2 MUST utilize https.c                 8    t          |          s
 |             d S r	   r   )clsr   s     r   checkzInsecureTransportError.check   s'    "3'' 	#%%K	 	r   N)r   r   r   errorr   classmethodr!   r   r   r   r   r      s7         E/K  [  r   r   c                       e Zd ZdZdS )InvalidRequestErrorinvalid_requestNr   r   r   r"   r   r   r   r%   r%   %   s        EEEr   r%   c                       e Zd ZdZdS )UnsupportedParameterErrorunsupported_parameterNr'   r   r   r   r)   r)   )   s        #EEEr   r)   c                       e Zd ZdZdS )UnsupportedSignatureMethodErrorunsupported_signature_methodNr'   r   r   r   r,   r,   -   s        *EEEr   r,   c                   "     e Zd ZdZ fdZ xZS )MissingRequiredParameterErrormissing_required_parameterc                 f    d| d}t          t          |                               |           d S )Nz	missing "z" in parameters)r   )r
   r/   r   )r   keyr   r   s      r   r   z&MissingRequiredParameterError.__init__4   s;    6#666+T22;;;TTTTTr   )r   r   r   r"   r   r   r   s   @r   r/   r/   1   sF        (EU U U U U U U U Ur   r/   c                       e Zd ZdZdS )%DuplicatedOAuthProtocolParameterError#duplicated_oauth_protocol_parameterNr'   r   r   r   r4   r4   9   s        1EEEr   r4   c                       e Zd ZdZdZdS )InvalidClientErrorinvalid_client  Nr   r   r   r"   r   r   r   r   r7   r7   =   s        EKKKr   r7   c                       e Zd ZdZdZdZdS )InvalidTokenErrorinvalid_tokenz.Invalid or expired "oauth_token" in parametersr9   N)r   r   r   r"   r   r   r   r   r   r<   r<   B   s        EBKKKKr   r<   c                       e Zd ZdZdZdS )InvalidSignatureErrorinvalid_signaturer9   Nr:   r   r   r   r?   r?   H   s        EKKKr   r?   c                       e Zd ZdZdZdS )InvalidNonceErrorinvalid_noncer9   Nr:   r   r   r   rB   rB   M   s        EKKKr   rB   c                       e Zd ZdZdZdS )AccessDeniedErroraccess_deniedz=The resource owner or authorization server denied the requestN)r   r   r   r"   r   r   r   r   rE   rE   R   s        EQKKKr   rE   c                       e Zd ZdZdZdS )MethodNotAllowedErrormethod_not_allowedi  Nr:   r   r   r   rH   rH   W   s         EKKKr   rH   N)__doc__authlib.common.errorsr   authlib.common.securityr   r   r   r%   r)   r,   r/   r4   r7   r<   r?   rB   rE   rH   r   r   r   <module>rM      sr    3 2 2 2 2 2 7 7 7 7 7 7

 

 

 

 

" 

 

 

    [       +   $ $ $ $ $ $ $ $+ + + + +k + + +U U U U UK U U U2 2 2 2 2K 2 2 2       
           K   
       
R R R R R R R R
    K     r   