
                         N    S SK Jr  S SKJrJr  S SKJr  S SKJr   " S S\5      rg)    )unicode_literals)WebApplicationClientInsecureTransportError)is_secure_transport)AuthBasec                   (    \ rS rSrSrSS jrS rSrg)OAuth2   z:Adds proof of authorization (OAuth2 token) to the request.Nc                     U=(       d	    [        XS9U l        U(       a0  UR                  5        H  u  pE[        U R                  XE5        M     gg)a  Construct a new OAuth 2 authorization object.

:param client_id: Client id obtained during registration
:param client: :class:`oauthlib.oauth2.Client` to be used. Default is
               WebApplicationClient which is useful for any
               hosted application but not mobile or desktop.
:param token: Token dictionary, must include access_token
              and token_type.
)tokenN)r   _clientitemssetattr)self	client_idclientr   kvs         0lib/third_party/requests_oauthlib/oauth2_auth.py__init__OAuth2.__init__
   s>     I1)IDL++-$!a#       c                     [        UR                  5      (       d
  [        5       eU R                  R	                  UR                  UR
                  UR                  UR                  S9u  Ul        Ul        Ul        U$ )zAppend an OAuth 2 token to the request.

Note that currently HTTPS is required for all requests. There may be
a token type that allows for plain HTTP in the future and then this
should be updated to allow plain HTTP on a white list basis.
)http_methodbodyheaders)r   urlr   r   	add_tokenmethodr   r   )r   rs     r   __call__OAuth2.__call__   sa     quu%%"$$#||55	188!&&!))  6  EAE19afHr   )r   )NNN)__name__
__module____qualname____firstlineno____doc__r   r!   __static_attributes__ r   r   r	   r	      s    B$r   r	   N)	
__future__r   oauthlib.oauth2r   r   r   requests.authr   r	   r)   r   r   <module>r-      s    ' H / "X r   