Skip to content
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

Correct default VisualStudioCodeCredential environment name #14648

Merged
merged 2 commits into from
Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sdk/identity/azure-identity/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
([#14354](https://github.com/Azure/azure-sdk-for-python/issues/14354))

### Fixed
- Prevent `VisualStudioCodeCredential` using invalid authentication data when
no user is signed in to Visual Studio Code
([#14438](https://github.com/Azure/azure-sdk-for-python/issues/14438))
- `ManagedIdentityCredential` uses the API version supported by Azure Functions
on Linux consumption hosting plans
([#14670](https://github.com/Azure/azure-sdk-for-python/issues/14670))


## 1.5.0b2 (2020-10-07)
### Fixed
- `AzureCliCredential.get_token` correctly sets token expiration time,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def _get_user_settings():
try:
with open(path) as file:
data = json.load(file)
environment_name = data.get("azure.cloud", "Azure")
environment_name = data.get("azure.cloud", "AzureCloud")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks fine.
Shouldn't this env also alter the target Azure Auth Host for VS code client ?
the auth host provided via kwargs/constructor/env will take priority, but if isn't specified then this env should be used to target a specific auth host too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps; that would be a new feature. I put it on the backlog as #14808

return environment_name
except IOError:
return "Azure"
return "AzureCloud"


def _get_refresh_token(service_name, account_name):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ def _get_user_settings():
try:
with open(path) as file:
data = json.load(file)
environment_name = data.get("azure.cloud", "Azure")
environment_name = data.get("azure.cloud", "AzureCloud")
return environment_name
except IOError:
return "Azure"
return "AzureCloud"


def _get_refresh_token(service_name, account_name):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ def _get_user_settings():
try:
with open(path) as file:
data = json.load(file)
environment_name = data.get("azure.cloud", "Azure")
environment_name = data.get("azure.cloud", "AzureCloud")
return environment_name
except IOError:
return "Azure"
return "AzureCloud"


def _get_refresh_token(service_name, account_name):
Expand Down