@@ -110,6 +110,7 @@ def _init_context_from_profile(
110
110
profile_name = normalized_selected_profile , overide_path = token_file_opt , save_token_file = save_token_file # type: ignore
111
111
)
112
112
113
+ auth_logger .debug (msg = f"Initializing Auth from profile { normalized_selected_profile } " )
113
114
return Auth .initialize_from_config (
114
115
client_config = auth_client_config ,
115
116
token_file = token_file_path ,
@@ -143,6 +144,7 @@ def _init_context_from_oauth_svc_account(
143
144
profile_name = adhoc_profile_name , overide_path = token_file_opt , save_token_file = save_token_file
144
145
)
145
146
147
+ auth_logger .debug (msg = f"Initializing Auth for service account { m2m_realm_name } :{ client_id } " )
146
148
plauth_context = Auth .initialize_from_config_dict (
147
149
client_config = constructed_client_config_dict ,
148
150
token_file = token_file_path ,
@@ -169,6 +171,7 @@ def _init_context_from_client_config(
169
171
profile_name = profile_name , overide_path = None , save_token_file = save_token_file
170
172
)
171
173
174
+ auth_logger .debug (msg = "Initializing Auth from provided configuration" )
172
175
plauth_context = Auth .initialize_from_config_dict (
173
176
client_config = client_config ,
174
177
initial_token_data = initial_token_data ,
@@ -216,6 +219,7 @@ def _init_context_from_api_key(api_key: str) -> Auth:
216
219
"bearer_token_prefix" : PlanetLegacyRequestAuthenticator .TOKEN_PREFIX ,
217
220
}
218
221
adhoc_profile_name = "_PL_API_KEY"
222
+ auth_logger .debug (msg = "Initializing Auth from API key" )
219
223
plauth_context = Auth .initialize_from_config_dict (
220
224
client_config = constructed_client_config_dict ,
221
225
token_file = None ,
@@ -249,18 +253,19 @@ def initialize_auth_client_context(
249
253
Between built-in profiles to interactively login users, customer or third party
250
254
registered OAuth clients and corresponding custom profiles that may be saved on disk,
251
255
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.
256
260
257
261
This helper function is provided to help build applications with a consistent
258
262
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 .
260
264
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:
264
269
- Arguments to this function.
265
270
- Environment variables.
266
271
- Values from configuration file.
0 commit comments