ķ
O'^c           @  s   d  Z  d d l m Z d d l m Z m Z d e f d     YZ d e f d     YZ d e f d	     YZ	 d
 e f d     YZ
 d e f d     YZ d S(   uŋ   
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.
i˙˙˙˙(   t   unicode_literals(   t	   urlencodet   add_params_to_urit   OAuth1Errorc           B  sP   e  Z d Z d  Z d d d d d  Z d   Z e d    Z e d    Z	 RS(   u    i  c         C  sq   | p |  j  |  _  d |  j |  j  f } | rE | d t |  7} n  t t |   j |  | |  _ | |  _ d S(   uŽ  
        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
        u   (%s) %su    N(   t   descriptiont   errort   reprt   superR   t   __init__t   urit   status_code(   t   selfR   R	   R
   t   requestt   message(    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyR      s    	c         C  s   t  | |  j  S(   N(   R   t	   twotuples(   R   R	   (    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyt   in_uri0   s    c         C  sZ   d |  j  f g } |  j r4 | j d |  j f  n  |  j rV | j d |  j f  n  | S(   Nu   erroru   error_descriptionu	   error_uri(   R   R   t   appendR	   (   R   R   (    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyR   3   s    		c         C  s   t  |  j  S(   N(   R   R   (   R   (    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyt
   urlencoded<   s    N(
   t   __name__t
   __module__t   NoneR   R   R   R   t   propertyR   R   (    (    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyR      s   			t   InsecureTransportErrorc           B  s   e  Z d  Z d Z RS(   u   insecure_transport_protocolu%   Only HTTPS connections are permitted.(   R   R   R   R   (    (    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyR   A   s   t   InvalidSignatureMethodErrorc           B  s   e  Z d  Z RS(   u   invalid_signature_method(   R   R   R   (    (    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyR   F   s   t   InvalidRequestErrorc           B  s   e  Z d  Z RS(   u   invalid_request(   R   R   R   (    (    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyR   J   s   t   InvalidClientErrorc           B  s   e  Z d  Z RS(   u   invalid_client(   R   R   R   (    (    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyR   N   s   N(   t   __doc__t
   __future__R    t   oauthlib.commonR   R   t	   ExceptionR   R   R   R   R   (    (    (    s@   /tmp/pip-unpacked-wheel-eAx2J6/oauthlib/oauth1/rfc5849/errors.pyt   <module>   s   3