ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
abc           @   s  d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l	 m
 Z
 m Z m Z d d l m Z d d l m Z d d l m Z d	 Z d
 Z d   Z d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d S(   s]   
requests.auth
~~~~~~~~~~~~~

This module contains the authentication handlers for Requests.
iN(   t	   b64encodei   (   t   urlparset   strt
   basestring(   t   extract_cookies_to_jar(   t   to_native_string(   t   parse_dict_headers!   application/x-www-form-urlencodeds   multipart/form-datac         C   s   t  |  t  s: t j d j |   d t t |   }  n  t  | t  st t j d j |  d t t |  } n  t  |  t  r |  j d  }  n  t  | t  r | j d  } n  d t t	 d j
 |  | f   j    } | S(   s   Returns a Basic Auth string.s   Non-string usernames will no longer be supported in Requests 3.0.0. Please convert the object you've passed in ({0!r}) to a string or bytes object in the near future to avoid problems.t   categorys   Non-string passwords will no longer be supported in Requests 3.0.0. Please convert the object you've passed in ({0!r}) to a string or bytes object in the near future to avoid problems.t   latin1s   Basic t   :(   t
   isinstanceR   t   warningst   warnt   formatt   DeprecationWarningR   t   encodeR   R    t   joint   strip(   t   usernamet   passwordt   authstr(    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   _basic_auth_str   s&    
		%t   AuthBasec           B   s   e  Z d  Z d   Z RS(   s4   Base class that all auth implementations derive fromc         C   s   t  d   d  S(   Ns   Auth hooks must be callable.(   t   NotImplementedError(   t   selft   r(    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   __call__K   s    (   t   __name__t
   __module__t   __doc__R   (    (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR   H   s   t   HTTPBasicAuthc           B   s2   e  Z d  Z d   Z d   Z d   Z d   Z RS(   s?   Attaches HTTP Basic Authentication to the given Request object.c         C   s   | |  _  | |  _ d  S(   N(   R   R   (   R   R   R   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   __init__R   s    	c         C   s:   t  |  j t | d d   k |  j t | d d   k g  S(   NR   R   (   t   allR   t   getattrt   NoneR   (   R   t   other(    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   __eq__V   s    c         C   s   |  | k S(   N(    (   R   R#   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   __ne__\   s    c         C   s    t  |  j |  j  | j d <| S(   Nt   Authorization(   R   R   R   t   headers(   R   R   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR   _   s    (   R   R   R   R   R$   R%   R   (    (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR   O   s
   			t   HTTPProxyAuthc           B   s   e  Z d  Z d   Z RS(   s=   Attaches HTTP Proxy Authentication to a given Request object.c         C   s    t  |  j |  j  | j d <| S(   Ns   Proxy-Authorization(   R   R   R   R'   (   R   R   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR   g   s    (   R   R   R   R   (    (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR(   d   s   t   HTTPDigestAuthc           B   sV   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 RS(	   s@   Attaches HTTP Digest Authentication to the given Request object.c         C   s%   | |  _  | |  _ t j   |  _ d  S(   N(   R   R   t	   threadingt   localt   _thread_local(   R   R   R   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR   o   s    		c         C   sa   t  |  j d  s] t |  j _ d |  j _ d |  j _ i  |  j _ d  |  j _ d  |  j _	 n  d  S(   Nt   initt    i    (
   t   hasattrR,   t   TrueR-   t
   last_noncet   nonce_countt   chalR"   t   post   num_401_calls(   R   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   init_per_thread_stateu   s    c            sN  |  j  j d } |  j  j d } |  j  j j d  } |  j  j j d  } |  j  j j d  } d   | d k rz d } n | j   } | d k s | d k r d   }	 |	   n | d	 k r d
   }
 |
   n    f d   }   d k r d Sd } t |  } | j pd } | j r+| d | j 7} n  d |  j | |  j	 f } d | | f }   |  }   |  } | |  j  j
 k r|  j  j d 7_ n d |  j  _ d |  j  j } t |  j  j  j d  } | | j d  7} | t j   j d  7} | t j d  7} t j |  j   d  } | d k rJ  d | | | f  } n  | sl| | d | | f  } nP | d k sd | j d  k rd | | | d | f } | | |  } n d S| |  j  _
 d |  j | | | | f } | r| d | 7} n  | r| d | 7} n  | r)| d | 7} n  | rF| d | | f 7} n  d | S(   s   
        :rtype: str
        t   realmt   noncet   qopt	   algorithmt   opaquet   MD5s   MD5-SESSc         S   s4   t  |  t  r! |  j d  }  n  t j |   j   S(   Ns   utf-8(   R
   R   R   t   hashlibt   md5t	   hexdigest(   t   x(    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   md5_utf8   s    t   SHAc         S   s4   t  |  t  r! |  j d  }  n  t j |   j   S(   Ns   utf-8(   R
   R   R   R=   t   sha1R?   (   R@   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   sha_utf8   s    c            s     d |  | f  S(   Ns   %s:%s(    (   t   st   d(   t	   hash_utf8(    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   <lambda>   R.   t   /t   ?s   %s:%s:%ss   %s:%si   s   %08xs   utf-8i   i   t   autht   ,s   %s:%s:%s:%s:%ss>   username="%s", realm="%s", nonce="%s", uri="%s", response="%s"s   , opaque="%s"s   , algorithm="%s"s   , digest="%s"s    , qop="auth", nc=%s, cnonce="%s"s	   Digest %sN(   R,   R3   t   getR"   t   upperR   t   patht   queryR   R   R1   R2   R   R   t   timet   ctimet   ost   urandomR=   RC   R?   t   split(   R   t   methodt   urlR7   R8   R9   R:   R;   t
   _algorithmRA   RD   t   KDt   entdigt   p_parsedRO   t   A1t   A2t   HA1t   HA2t   ncvalueRE   t   cnoncet   respdigt   noncebitt   base(    (   RG   s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   build_digest_header   sr    						!c         K   s   | j  r d |  j _ n  d S(   s)   Reset num_401_calls counter on redirects.i   N(   t   is_redirectR,   R5   (   R   R   t   kwargs(    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   handle_redirect   s    	c         K   s  d | j  k o d k  n s/ d |  j _ | S|  j j d k	 r] | j j j |  j j  n  | j j	 d d  } d | j
   k r~|  j j d k  r~|  j j d 7_ t j d d	 t j } t | j d | d
 d  |  j _ | j | j   | j j   } t | j | j | j  | j | j  |  j | j | j  | j d <| j j | |  } | j j |  | | _ | Sd |  j _ | S(   so   
        Takes the given response and tries digest-auth, if needed.

        :rtype: requests.Response
        i  i  i   s   www-authenticateR.   t   digesti   s   digest t   flagst   countR&   N(   t   status_codeR,   R5   R4   R"   t   requestt   bodyt   seekR'   RM   t   lowert   ret   compilet
   IGNORECASER   t   subR3   t   contentt   closet   copyR   t   _cookiest   rawt   prepare_cookiesRe   RV   RW   t
   connectiont   sendt   historyt   append(   R   R   Rg   t   s_autht   patt   prept   _r(    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt
   handle_401   s.    	$$
	c         C   s   |  j    |  j j r8 |  j | j | j  | j d <n  y | j j   |  j _	 Wn t
 k
 rp d  |  j _	 n X| j d |  j  | j d |  j  d |  j _ | S(   NR&   t   responsei   (   R6   R,   R1   Re   RV   RW   R'   Rn   t   tellR4   t   AttributeErrorR"   t   register_hookR   Rh   R5   (   R   R   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR   
  s    
"c         C   s:   t  |  j t | d d   k |  j t | d d   k g  S(   NR   R   (   R    R   R!   R"   R   (   R   R#   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR$     s    c         C   s   |  | k S(   N(    (   R   R#   (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR%   $  s    (   R   R   R   R   R6   Re   Rh   R   R   R$   R%   (    (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyR)   l   s   		
	Z		,		(   R   RS   Rq   RQ   R=   R*   R   t   base64R    t   compatR   R   R   t   cookiesR   t   _internal_utilsR   t   utilsR   t   CONTENT_TYPE_FORM_URLENCODEDt   CONTENT_TYPE_MULTI_PARTR   t   objectR   R   R(   R)   (    (    (    s=   /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyt   <module>   s$   	,