+
    <	�iù'  ã                   ó  € R t  ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIHtHt ^ RIHt ^ RIHt ]t. ROtRt ! R R	4      t ! R R4      t ! R R]4      t ! R R]4      t ! R R
]4      tR#   ] d
    ^ RIHt  Lxi ; i)z.OAuth classes for use with lazr.restfulclient.)ÚConfigParser)ÚSafeConfigParserN)Úoauth1)Úparse_qsÚ	urlencode)ÚHttpAuthorizer)ÚCredentialsFileErrorÚAccessTokenÚConsumerÚOAuthAuthorizerÚSystemWideConsumerÚ1c                   ó.   a € ] tR t^5t o RtRR ltRtV tR# )r
   z An OAuth consumer (application).Nc                ó*   € Wn         W n        W0n        R# )a6  Initialize

:param key: The OAuth consumer key
:param secret: The OAuth consumer secret. Don't use this. It's
    a misfeature, and lazr.restful doesn't expect it.
:param application_name: An application name, if different
    from the consumer key. If present, this will be used in
    the User-Agent header.
N)ÚkeyÚsecretÚapplication_name)Úselfr   r   r   s   &&&&ÚD/usr/lib/python3/dist-packages/lazr/restfulclient/authorize/oauth.pyÚ__init__ÚConsumer.__init__8   s   € ð ŒØŒØ 0Öó    )r   r   r   ©Ú N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r
   r
   5   s   ø‡ € Ù*÷1ò 1r   c                   óH   a € ] tR t^Gt o RtRR ltR t]t]R 4       t	Rt
V tR# )r	   zAn OAuth access token.Nc                ó*   € Wn         W n        W0n        R # ©N)r   r   Úcontext)r   r   r   r&   s   &&&&r   r   ÚAccessToken.__init__J   s   € ØŒØŒØŽr   c                óL   € \        R V P                  3RV P                  3.4      # )Úoauth_token_secretÚoauth_token)r   r   r   ©r   s   &r   Ú	to_stringÚAccessToken.to_stringO   s,   € Üà% t§{¡{Ð3Ø §¡Ð)ðó
ð 	
r   c                ól   € \        VR R7      pVR,          ^ ,          pVR,          ^ ,          pV ! W44      # )F)Úkeep_blank_valuesr*   r)   )r   )ÚclsÚsÚparamsr   r   s   &&   r   Úfrom_stringÚAccessToken.from_stringY   s8   € ä˜!¨uÔ5ˆØ�]Õ# AÕ&ˆØÐ,Õ-¨aÕ0ˆÙ�3ÓÐr   )r&   r   r   r   )r   r   r   r   r   r   r,   Ú__str__Úclassmethodr3   r   r    r!   s   @r   r	   r	   G   s+   ø‡ € Ù ôò

ð €Gàñ ó ö r   c                   ó.   a € ] tR t^at o RtR t]tRtV tR# )ÚTruthyStringz&A Unicode string which is always true.c                ó   € R # )T© r+   s   &r   Ú__bool__ÚTruthyString.__bool__d   s   € Ùr   r:   N)	r   r   r   r   r   r;   Ú__nonzero__r   r    r!   s   @r   r8   r8   a   s   ø‡ € Ù0òð †Kr   r8   c                   óN   a a€ ] tR t^jt oRtRtRV 3R llt]R 4       tRt	Vt
V ;t# )r   zïA consumer associated with the logged-in user rather than an app.

This can be used to share a single OAuth token among multiple
desktop applications. The OAuth consumer key will be derived from
system information (platform and hostname).
zSystem-wide: %s (%s)c                óD   <€ \         \        V `  V P                  W!4       R# )záConstructor.

:param application_name: An application name. This will be
    used in the User-Agent header.
:param secret: The OAuth consumer secret. Don't use this. It's
    a misfeature, and lazr.restful doesn't expect it.
N)Úsuperr   r   Úconsumer_key)r   r   r   Ú	__class__s   &&&€r   r   ÚSystemWideConsumer.__init__t   s    ø€ ô 	Ô  $Ñ0Ø×Ñ˜vö	
r   c                óÚ   €  ^ RI pVP                  4       pVR8X  d   \        P                  ! 4       pV P
                  V\        P                  ! 4       3,          #   \         d    Rp LSi ; i)z›The system-wide OAuth consumer key for this computer.

This key identifies the platform and the computer's
hostname. It does not identify the active user.
Nr   )ÚdistroÚnameÚ	ExceptionÚplatformÚsystemÚ
KEY_FORMATÚsocketÚgethostname)r   rE   Údistnames   &  r   rA   ÚSystemWideConsumer.consumer_key€   s_   € ð	Ûà—{‘{“}ˆHð
 �rŒ>Ü—’Ó(ˆHØ�‰ (¬F×,>Ò,>Ó,@Ð!AÕAÐAøô ô 	ð ŠHð	ús   ‚A ÁA*Á)A*r:   )r   )r   r   r   r   r   rJ   r   ÚpropertyrA   r   r    Ú__classcell__)rB   r"   s   @@r   r   r   j   s2   ù‡ € ñð (€J÷

ð ñBó ÷Bð Br   c                   óf   a € ] tR t^”t o RtRR lt]R 4       tR t]	R 4       t
R tR tR	 tR
tV tR# )r   zBA client that signs every outgoing request with OAuth credentials.Nc                óV   € R V n         Ve   \        WV4      V n         W0n        W@n        R # r%   )Úconsumerr
   Úaccess_tokenÚoauth_realm)r   Úconsumer_nameÚconsumer_secretrT   rU   r   s   &&&&&&r   r   ÚOAuthAuthorizer.__init__—   s1   € ð ˆŒØÒ$Ü$ØÐ0@óˆDŒMð )ÔØ&Ör   c                ó¾   € / pV P                   f   V# V P                   P                  VR&   V P                   P                  e   V P                   P                  VR&   V# )z_Any information necessary to identify this user agent.

In this case, the OAuth consumer name.
Úoauth_consumerÚapplication)rS   r   r   )r   r2   s   & r   Úuser_agent_paramsÚ!OAuthAuthorizer.user_agent_params§   sV   € ð ˆØ�=‰=Ò ØˆMØ#'§=¡=×#4Ñ#4ˆÐÑ Ø�=‰=×)Ñ)Ò5Ø$(§M¡M×$BÑ$BˆF�=Ñ!Øˆr   c                óÒ  € \        4       p\        VR4      '       d   VP                  pMVP                  pV! V4       VP	                  \
        4      '       g   \        R\
        ,          4      hVP                  \
        R4      pVP                  \
        R4      p\        WE4      V n	        VP                  \
        R4      pVP                  \
        R4      p\        Wg4      V n        R# )a;  Load credentials from a file-like object.

This overrides the consumer and access token given in the constructor
and replaces them with the values read from the file.

:param readable_file: A file-like object to read the credentials from
:type readable_file: Any object supporting the file-like `read()`
    method
Ú	read_filezNo configuration for version %srA   rW   rT   Úaccess_secretN)r   Úhasattrr_   ÚreadfpÚhas_sectionÚCREDENTIALS_FILE_VERSIONr   Úgetr
   rS   r	   rT   )r   Úreadable_fileÚparserÚreaderrA   rW   rT   r`   s   &&      r   ÚloadÚOAuthAuthorizer.loadµ   sÃ   € ô "Ó#ˆÜ�6˜;×'Ò'Ø×%Ñ%‰Fà—]‘]ˆFÙˆ}Ôð ×!Ñ!Ô":×;Ò;Ü&Ø1Ô4LÕLóð ð —z‘zÔ":¸NÓKˆØ Ÿ*™*Ü$Ð&7ó
ˆô ! Ó?ˆŒØ—z‘zÔ":¸NÓKˆØŸ
™
Ô#;¸_ÓMˆÜ'¨ÓDˆÖr   c                ón   € V ! 4       p\        VR4      pVP                  V4       VP                  4        V# )aY  Convenience method for loading credentials from a file.

Open the file, create the Credentials and load from the file,
and finally close the file and return the newly created
Credentials instance.

:param path: In which file the credential file should be saved.
:type path: string
:return: The loaded Credentials instance.
:rtype: `Credentials`
Úr)Úopenri   Úclose)r0   ÚpathÚcredentialsÚcredentials_files   &&  r   Úload_from_pathÚOAuthAuthorizer.load_from_pathÕ   s8   € ñ “eˆÜ  c›?ÐØ×ÑÐ)Ô*Ø×ÑÔ ØÐr   c                ó"  € V P                   f   \        R4      hV P                  f   \        R4      h\        4       pVP	                  \
        4       VP                  \
        RV P                   P                  4       VP                  \
        RV P                   P                  4       VP                  \
        RV P                  P                  4       VP                  \
        RV P                  P                  4       VP                  V4       R# )a  Write the credentials to the file-like object.

:param writable_file: A file-like object to write the credentials to
:type writable_file: Any object supporting the file-like `write()`
    method
:raise CredentialsFileError: when there is either no consumer or no
    access token
NzNo consumerzNo access tokenrA   rW   rT   r`   )
rS   r   rT   r   Úadd_sectionrd   Úsetr   r   Úwrite)r   Úwritable_filerg   s   && r   ÚsaveÚOAuthAuthorizer.saveè   sÑ   € ð �=‰=Ò Ü& }Ó5Ð5Ø×ÑÒ$Ü&Ð'8Ó9Ð9ä!Ó#ˆØ×ÑÔ3Ô4Ø�
‰
Ô+¨^¸T¿]¹]×=NÑ=NÔOØ�
‰
Ü$Ð&7¸¿¹×9MÑ9Mô	
ð 	�
‰
Ü$ n°d×6GÑ6G×6KÑ6Kô	
ð 	�
‰
Ü$ o°t×7HÑ7H×7OÑ7Oô	
ð 	�‰�]Ö#r   c                óX  € \         P                  ! \         P                  ! V\         P                  \         P                  ,          \         P
                  ,          \        P                  \        P                  ,          4      R4      pV P                  V4       VP                  4        R# )a$  Convenience method for saving credentials to a file.

Create the file, call self.save(), and close the
file. Existing files are overwritten. The resulting file will
be readable and writable only by the user.

:param path: In which file the credential file should be saved.
:type path: string
ÚwN)ÚosÚfdopenrm   ÚO_CREATÚO_TRUNCÚO_WRONLYÚstatÚS_IREADÚS_IWRITEry   rn   )r   ro   rq   s   && r   Úsave_to_pathÚOAuthAuthorizer.save_to_path  sk   € ô Ÿ9š9Ü�GŠGØÜ—‘œbŸj™jÕ(¬2¯;©;Õ6Ü—‘¤§¡Õ-óð
 ó
Ðð 	�	‰	Ð"Ô#Ø×ÑÖ r   c           	     óÊ  € \         P                  ! V P                  P                  V P                  P                  \        V P                  P                  ;'       g    R4      V P                  P                  \         P                  V P                  R7      p\        VP                  4      Vn	        VP                  V4      w  rgpVP                  4        F	  w  r‰W”V&   K  	  R# )z&Sign a request with OAuth credentials.r   )Úclient_secretÚresource_owner_keyÚresource_owner_secretÚsignature_methodÚrealmN)r   ÚClientrS   r   r   r8   rT   ÚSIGNATURE_PLAINTEXTrU   r‰   ÚsignÚitems)
r   Úabsolute_uriÚmethodÚbodyÚheadersÚclientÚ_Úsigned_headersr   Úvalues
   &&&&&     r   ÚauthorizeRequestÚ OAuthAuthorizer.authorizeRequest  s«   € ä—’Ø�M‰M×ÑØŸ-™-×.Ñ.Ü+¨D×,=Ñ,=×,AÑ,A×,GÐ,GÀRÓHØ"&×"3Ñ"3×":Ñ":Ü#×7Ñ7Ø×"Ñ"ô
ˆô %1°×1JÑ1JÓ$KˆÔ!Ø%Ÿ{™{¨<Ó8Ñˆ˜1Ø(×.Ñ.Ö0‰JˆCØ �C‹Ló 1r   )rT   rS   rU   )Nr   NÚOAuthN)r   r   r   r   r   r   rO   r\   ri   r6   rr   ry   r…   r™   r   r    r!   s   @r   r   r   ”   sP   ø‡ € ÙLô'ð  ñó ðòEð@ ñó ðò$$ò8!÷*!ð !r   )r	   r
   r   r   )r   Úconfigparserr   r   ÚImportErrorr}   rH   rK   r‚   Úoauthlibr   Úurllib.parser   r   Úlazr.restfulclient.authorizer   Úlazr.restfulclient.errorsr   ÚtypeÚ__metaclass__Ú__all__rd   r
   r	   Ústrr8   r   r   r:   r   r   Ú<module>r¦      s’   ðñ& 5ð.å=ó 
Û Û Û å ß ,å 7Ý :à€ò€ð Ð ÷
1ñ 1÷$ ñ  ô4�3ô ô'B˜ô 'BôTV!�nö V!øðw ô .ß-ð.ús   „A3 Á3BÂB