@@ -110,6 +110,7 @@ def _init_context_from_profile(
110110 profile_name = normalized_selected_profile , overide_path = token_file_opt , save_token_file = save_token_file # type: ignore
111111 )
112112
113+ auth_logger .debug (msg = f"Initializing Auth from profile { normalized_selected_profile } " )
113114 return Auth .initialize_from_config (
114115 client_config = auth_client_config ,
115116 token_file = token_file_path ,
@@ -143,6 +144,7 @@ def _init_context_from_oauth_svc_account(
143144 profile_name = adhoc_profile_name , overide_path = token_file_opt , save_token_file = save_token_file
144145 )
145146
147+ auth_logger .debug (msg = f"Initializing Auth for service account { m2m_realm_name } :{ client_id } " )
146148 plauth_context = Auth .initialize_from_config_dict (
147149 client_config = constructed_client_config_dict ,
148150 token_file = token_file_path ,
@@ -169,6 +171,7 @@ def _init_context_from_client_config(
169171 profile_name = profile_name , overide_path = None , save_token_file = save_token_file
170172 )
171173
174+ auth_logger .debug (msg = "Initializing Auth from provided configuration" )
172175 plauth_context = Auth .initialize_from_config_dict (
173176 client_config = client_config ,
174177 initial_token_data = initial_token_data ,
@@ -216,6 +219,7 @@ def _init_context_from_api_key(api_key: str) -> Auth:
216219 "bearer_token_prefix" : PlanetLegacyRequestAuthenticator .TOKEN_PREFIX ,
217220 }
218221 adhoc_profile_name = "_PL_API_KEY"
222+ auth_logger .debug (msg = "Initializing Auth from API key" )
219223 plauth_context = Auth .initialize_from_config_dict (
220224 client_config = constructed_client_config_dict ,
221225 token_file = None ,
@@ -249,18 +253,19 @@ def initialize_auth_client_context(
249253 Between built-in profiles to interactively login users, customer or third party
250254 registered OAuth clients and corresponding custom profiles that may be saved on disk,
251255 OAuth service account profiles, and static API keys, there are a number of
252- ways to configure how an application build with this library should authenticate
253- requests made to the service. Add to this, configration may come from explict
254- parameters set by the user, environment variables, or configuration files, and the
255- number of possibilities rises.
256+ ways to configure how an application built with this library should authenticate
257+ requests made to the service. Add to this configration may come from explict
258+ parameters set by the user, environment variables, configuration files, or values
259+ hard-coded by the application developer, and the number of possibilities rises.
256260
257261 This helper function is provided to help build applications with a consistent
258262 user experience when sharing auth context with the CLI. This function
259- does not at this time support using custom storage providers.
263+ does not support using custom storage providers at this time .
260264
261- Arguments to this function are taken to be explicitly set by the user, and are
262- given the highest priority. Internally, the priority used for the source of
263- any particular configuration values is, from highest to lowest priority, as follows:
265+ Arguments to this function are taken to be explicitly set by the user or
266+ application developer, and are given the highest priority. Internally, the
267+ priority used for the source of any particular configuration values is, from
268+ highest to lowest priority, as follows:
264269 - Arguments to this function.
265270 - Environment variables.
266271 - Values from configuration file.
0 commit comments