+
    oih                         R t ^ RIt ^ RIt^ RItRt ^ RIt ^ RIt^ RI	tRt
RR ltRR ltR tR tR tR	 tR
 tR tR#   ] d    Rt L9i ; i  ] d    Rt LCi ; i  ] d    Rt
 LGi ; i)z=Helpers for authentication using oauth2client or google-auth.NTFc                z    \         '       d&   \        P                  P                  WVR7      w  r4V# \	        R4      h)z'Returns credentials loaded from a file.scopesquota_project_idzAclient_options.credentials_file is only supported in google-auth.)HAS_GOOGLE_AUTHgoogleauthload_credentials_from_fileEnvironmentError)filenamer   r   credentials_s   &&&  x/Users/tonyclaw/.openclaw/workspace/scripts/youtube-playlists/venv/lib/python3.14/site-packages/googleapiclient/_auth.pycredentials_from_filer   )   sA    ??6F @ 
 O
 	
    c                   \         '       d%   \        P                  P                  WR7      w  r#V# \        '       d<   V f   Ve   \        R4      h\        P                  P                  P                  4       # \        R4      h)z(Returns Application Default Credentials.r   zwclient_options.scopes and client_options.quota_project_id are not supported in oauth2client.Please install google-auth.zZNo authentication library is available. Please install either google-auth or oauth2client.)
r   r   r   defaultHAS_OAUTH2CLIENTr
   oauth2clientclientGoogleCredentialsget_application_default)r   r   r   r   s   &&  r   default_credentialsr   6   s    ,, - 
 		!1!=".  ""44LLNN+
 	
r   c                N   \         '       d^   \        V \        P                  P                  P
                  4      '       d*   \        P                  P                  P                  W4      #  V P                  4       '       d   V P                  V4      # V #   \         d    T u # i ; i)aa  Scopes the credentials if necessary.

Args:
    credentials (Union[
        google.auth.credentials.Credentials,
        oauth2client.client.Credentials]): The credentials to scope.
    scopes (Sequence[str]): The list of scopes.

Returns:
    Union[google.auth.credentials.Credentials,
        oauth2client.client.Credentials]: The scoped credentials.
)
r   
isinstancer   r   r   Credentialswith_scopes_if_requiredcreate_scoped_requiredcreate_scopedAttributeError)r   r   s   &&r   with_scopesr    K   s     :k6;;3J3J3V3VWW{{&&>>{SS	1133"0088"" 		s   +B B B B$#B$c                   ^ RI Hp \        '       dd   \        V \        P
                  P                  P                  4      '       d0   \        f   \        R4      h\        P                  ! W! 4       R7      # V P                  V! 4       4      # )aA  Returns an http client that is authorized with the given credentials.

Args:
    credentials (Union[
        google.auth.credentials.Credentials,
        oauth2client.client.Credentials]): The credentials to use.

Returns:
    Union[httplib2.Http, google_auth_httplib2.AuthorizedHttp]: An
        authorized http client.
)
build_httpzCredentials from google.auth specified, but google-api-python-client is unable to use these credentials unless google-auth-httplib2 is installed. Please install google-auth-httplib2.http)googleapiclient.httpr"   r   r   r   r   r   r   google_auth_httplib2
ValueErrorAuthorizedHttp	authorize)r   r"   s   & r   authorized_httpr*   d   sj     0:k6;;3J3J3V3VWW'(  $22;Z\RR$$Z\22r   c                    \         P                  ! 4       p\        '       d\   \        V \        P
                  P                  P                  4      '       d(   \        P                  ! V4      pV P                  V4      # V P                  V4      # N)httplib2Httpr   r   r   r   r   r   r&   Requestrefresh)r   refresh_httprequests   &  r   refresh_credentialsr3      sb    
 ==?L:k6;;3J3J3V3VWW&..|<""7++""<00r   c                 \    \        V 4      '       g   \        V 4       V P                  V4      # r,   )is_validr3   apply)r   headerss   &&r   apply_credentialsr8      s&    K  K(W%%r   c                     \         '       dA   \        V \        P                  P                  P
                  4      '       d   V P                  # V P                  R J;'       d    V P                  '       * # r,   )	r   r   r   r   r   r   validaccess_tokenaccess_token_expired)r   s   &r   r5   r5      sZ    :k6;;3J3J3V3VWW    $$D0 5 5444	
r   c                    V f   R # \        V P                  R4      '       d   V P                  P                  # \        V R4      '       d7   \        V P                  \        P
                  4      '       g   V P                  # R # )Nr   )hasattrr2   r   r   r-   r   r#   s   &r   get_credentials_from_httpr?      sf    |	}	-	-||'''	}	%	%j(../ / r   )NN)__doc__r-   google.authr   google.auth.credentialsr   ImportErrorr&   r   oauth2client.clientr   r   r   r    r*   r3   r8   r5   r?    r   r   <module>rF      s    D "O 



*236
1&

K  O
      s3   
A  A 
A  	AA	AA	A*)A*