
    kh                        d Z ddlZddlZddlZddlZddlZdZdZ ej                          ej                  dddd	       ej                  d
dddd       ej                  dddddd       ej                  dddej                  j                   ej                  e      e      d      d                                    Zedk(  r e        yy)a
  Command-line tool for obtaining authorization and credentials from a user.

This tool uses the OAuth 2.0 Authorization Code grant as described in
`section 1.3.1 of RFC6749`_ and implemeted by
:class:`google_auth_oauthlib.flow.Flow`.

This tool is intended for assist developers in obtaining credentials
for testing applications where it may not be possible or easy to run a
complete OAuth 2.0 authorization flow, especially in the case of code
samples or embedded devices without input / display capabilities.

This is not intended for production use where a combination of
companion and on-device applications should complete the OAuth 2.0
authorization flow to get authorization from the users.

.. _section 1.3.1 of RFC6749: https://tools.ietf.org/html/rfc6749#section-1.3.1
    Nzgoogle-oauthlib-toolzcredentials.jsonz--client-secretsz<client_secret_json_file>Tz'Path to OAuth2 client secret JSON file.)metavarrequiredhelpz--scopez<oauth2 scope>z#API scopes to authorize access for.)multipler   r   r   z--savez<save_mode>FzSave the credentials to file.)is_flagr   show_defaultdefaultr   z--credentialsz<oauth2_credentials>z!Path to store OAuth2 credentials.)r   r   r	   r   c                    t         j                  j                  j                  | |      }|j	                         }|j
                  |j                  |j                  |j                  |j                  |j                  d}|r|d= t        j                  j                  |      }|r4t        j                  j                  |      st        j                  |       t!        |d      5 }t#        j$                  ||       ddd       t'        j(                  d|z         yt'        j(                  t#        j*                  |             y# 1 sw Y   KxY w)a)  Command-line tool for obtaining authorization and credentials from a user.

    This tool uses the OAuth 2.0 Authorization Code grant as described
    in section 1.3.1 of RFC6749:
    https://tools.ietf.org/html/rfc6749#section-1.3.1

    This tool is intended for assist developers in obtaining credentials
    for testing applications or samples.

    This is not intended for production use where a combination of
    companion and on-device applications should complete the OAuth 2.0
    authorization flow to get authorization from the users.

    )scopes)tokenrefresh_token	token_uri	client_idclient_secretr   r   wNzcredentials saved: %s)google_auth_oauthlibflowInstalledAppFlowfrom_client_secrets_filerun_local_serverr   r   r   r   r   r   ospathdirnameisdirmakedirsopenjsondumpclickechodumps)	client_secretsscopesavecredentialsr   creds
creds_dataconfig_pathoutfiles	            ^/var/www/teggl/fontify/venv/lib/python3.12/site-packages/google_auth_oauthlib/tool/__main__.pymainr+   .   s
   Z  $$55NNu O D !!#E ,,____,,,,J wggook2rww}}[9KK$+s# 	+wIIj'*	+ 	

*[89 	

4::j)*	+ 	+s   'EE__main__)__doc__r   r   os.pathr   google_auth_oauthlib.flowr   APP_NAMEDEFAULT_CREDENTIALS_FILENAMEcommandoptionr   joinget_app_dirr+   __name__     r*   <module>r9      s  $  	     "1  '	2	 	. 	( "GGLL***846RS	,,+ :,+^ zF r8   