
    &g                        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                             ej        e          e          d          d                                                             Zedk    r e             dS dS )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                 r   t           j        j                            | |          }|                                }|j        |j        |j        |j        |j	        |j
        d}|r|d= t          j                            |          }|r3t          j                            |          st          j        |           t!          |d          5 }t#          j        ||           ddd           n# 1 swxY w Y   t'          j        d|z             dS t'          j        t#          j        |                     dS )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	            T/var/www/api/venv/lib/python3.11/site-packages/google_auth_oauthlib/tool/__main__.pymainr+   .   sr   Z  $5NNu O  D !!##E ,__,, J  +wgook22 	%rw}}[99 	%K$$$+s## 	+wIj'***	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	
*[899999 	
4:j))*****s   C--C14C1__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      sw   $  				           "1  '	2	   	.   	(   "GLL**8446RSS	,  ,+ ,+     :,+^ zDFFFFF r8   