-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose token_source for observability #610
Conversation
@@ -63,6 +63,7 @@ | |||
result = global_app.acquire_token_for_client(scopes=config["scope"]) | |||
|
|||
if "access_token" in result: | |||
print("Token was obtain from:", result["token_source"]) # Since MSAL 1.25 |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
@@ -62,6 +62,7 @@ | |||
result = global_app.acquire_token_for_client(scopes=config["scope"]) | |||
|
|||
if "access_token" in result: | |||
print("Token was obtain from:", result["token_source"]) # Since MSAL 1.25 |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
sample/device_flow_sample.py
Outdated
@@ -84,6 +84,7 @@ | |||
# and then keep calling acquire_token_by_device_flow(flow) in your own customized loop. | |||
|
|||
if "access_token" in result: | |||
print("Token was obtain from:", result["token_source"]) # Since MSAL 1.25 |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
sample/interactive_sample.py
Outdated
@@ -79,6 +79,7 @@ | |||
) | |||
|
|||
if "access_token" in result: | |||
print("Token was obtain from:", result["token_source"]) # Since MSAL 1.25 |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
sample/username_password_sample.py
Outdated
@@ -66,6 +66,7 @@ | |||
config["username"], config["password"], scopes=config["scope"]) | |||
|
|||
if "access_token" in result: | |||
print("Token was obtain from:", result["token_source"]) # Since MSAL 1.25 |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
sample/vault_jwt_sample.py
Outdated
@@ -125,6 +125,7 @@ | |||
result = global_app.acquire_token_for_client(scopes=config["scope"]) | |||
|
|||
if "access_token" in result: | |||
print("Token was obtain from:", result["token_source"]) # Since MSAL 1.25 |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
This will address #602 's first requirement. The successful token acquisition result will have a new key
token_source
whose value will beidp
,cache
orbroker
.Existing unit test cases have been updated to test this new behavior.