
    qh	                         S r SSKJrJr   " S S\5      r " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      r	g)z
oauthlib.oauth1.rfc5849.errors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error used both by OAuth 1 clients and provicers to represent the spec
defined error responses for all four core grant types.
    )add_params_to_uri	urlencodec                   ^   ^  \ rS rSrSrSr  S	U 4S jjrS r\S 5       r	\S 5       r
SrU =r$ )
OAuth1Error   N c                    > U=(       d    U R                   U l         SR                  U R                  U R                   5      nU(       a  US[        U5      -   -  n[        TU ]  U5        X l        X0l        g)a6  
description:    A human-readable ASCII [USASCII] text providing
                additional information, used to assist the client
                developer in understanding the error that occurred.
                Values for the "error_description" parameter MUST NOT
                include characters outside the set
                x20-21 / x23-5B / x5D-7E.

uri:    A URI identifying a human-readable web page with information
        about the error, used to provide the client developer with
        additional information about the error.  Values for the
        "error_uri" parameter MUST conform to the URI- Reference
        syntax, and thus MUST NOT include characters outside the set
        x21 / x23-5B / x5D-7E.

state:  A CSRF protection value received from the client.

request:  Oauthlib Request object
z({}) {} N)descriptionformaterrorreprsuper__init__uristatus_code)selfr   r   r   requestmessage	__class__s         P/var/www/html/env/lib/python3.13/site-packages/oauthlib/oauth1/rfc5849/errors.pyr   OAuth1Error.__init__   sb    * ':$*:*:""4::t/?/?@sT']**G!&    c                 ,    [        XR                  5      $ N)r   	twotuples)r   r   s     r   in_uriOAuth1Error.in_uri-   s     nn55r   c                     SU R                   4/nU R                  (       a  UR                  SU R                  45        U R                  (       a  UR                  SU R                  45        U$ )Nr   error_description	error_uri)r   r   appendr   )r   r   s     r   r   OAuth1Error.twotuples0   sU    4::&'LL-t/?/?@A88LL+txx01r   c                 ,    [        U R                  5      $ r   )r   r   )r   s    r   
urlencodedOAuth1Error.urlencoded9   s    ((r   )r   r   r   )NNi  N)__name__
__module____qualname____firstlineno__r   r   r   r   propertyr   r%   __static_attributes____classcell__)r   s   @r   r   r      sE    EK?B'<6   ) )r   r   c                       \ rS rSrSrSrSrg)InsecureTransportError>   insecure_transport_protocolz%Only HTTPS connections are permitted. N)r'   r(   r)   r*   r   r   r,   r2   r   r   r/   r/   >   s    )E9Kr   r/   c                       \ rS rSrSrSrg)InvalidSignatureMethodErrorC   invalid_signature_methodr2   Nr'   r(   r)   r*   r   r,   r2   r   r   r4   r4   C   s    &Er   r4   c                       \ rS rSrSrSrg)InvalidRequestErrorG   invalid_requestr2   Nr7   r2   r   r   r9   r9   G   s    Er   r9   c                       \ rS rSrSrSrg)InvalidClientErrorK   invalid_clientr2   Nr7   r2   r   r   r=   r=   K   s    Er   r=   N)
__doc__oauthlib.commonr   r   	Exceptionr   r/   r4   r9   r=   r2   r   r   <module>rC      sL    90)) 0)f:[ :
'+ '+  r   