-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Core} Decouple get_raw_token from SDK token protocol
#31063
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,7 +151,7 @@ def build_sdk_access_token(token_entry): | |
| # This can slow down commands that doesn't need azure.core, like `az account get-access-token`. | ||
| # So We define our own AccessToken. | ||
| from .constants import ACCESS_TOKEN, EXPIRES_IN | ||
| return AccessToken(token_entry[ACCESS_TOKEN], _now_timestamp() + token_entry[EXPIRES_IN]) | ||
| return AccessToken(token_entry[ACCESS_TOKEN], now_timestamp() + token_entry[EXPIRES_IN]) | ||
|
|
||
|
|
||
| def decode_access_token(access_token): | ||
|
|
@@ -177,6 +177,6 @@ def read_response_templates(): | |
| return success_template, error_template | ||
|
|
||
|
|
||
| def _now_timestamp(): | ||
| def now_timestamp(): | ||
|
||
| import time | ||
| return int(time.time()) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
token_entryis actually a remnant of ADAL, but replacing it withmsal_tokenwill be a breaking change.msal_tokencontains:{ "access_token": "...", "token_type": "Bearer", "expires_in": 4678, "token_source": "cache" }