Skip to content

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented May 13, 2020

Description
Adopt latest changes from Azure Identity Azure/azure-sdk-for-python#10612

As stated in chlowell/azure-sdk-for-python#4 (comment), UsernamePasswordCredential doesn't support authenticate anymore. When username+password is used as authentication method, AuthenticationRecord can't be created. Azure CLI can't persist AuthenticationRecord and retrieve the refresh token anymore.

Actually, I think maybe we shouldn't use the name Interactive, but instead, we can flatten InteractiveCredential and directly put InteractiveBrowserCredential, DeviceCodeCredential and UsernamePasswordCredential under PublicClientCredential.

Created Teams thread :UsernamePasswordCredential.authenticate is removed

@jiasli jiasli changed the title Adopt latest changes from Azure Identity {Identity} Adopt latest changes from Azure Identity May 13, 2020
return InteractiveBrowserCredential(profile=auth_profile, silent_auth_only=True)
auth_record = AuthenticationRecord(self.tenant_id, self.client_id, self.authority,
home_account_id, username)
return InteractiveBrowserCredential(authentication_record=auth_record, disable_automatic_authentication=True,
Copy link
Member Author

@jiasli jiasli May 13, 2020

Choose a reason for hiding this comment

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

InteractiveCredential/PublicClientCredential which is the base class of InteractiveBrowserCredential and DeviceCodeCredential should be exposed in azure/identity/__init__.py.

CLI won't know which type the user used to login before. Choosing any one of InteractiveBrowserCredential and DeviceCodeCredential works, yes, but this is not a good programming practice as we are using the base class from sub class. See Teams thread: InteractiveCredential should be exposed

image

jiasli added 2 commits May 13, 2020 17:33
# Conflicts:
#	src/azure-cli-core/azure/cli/core/_identity.py
Copy link
Member

@qianwens qianwens left a comment

Choose a reason for hiding this comment

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

:shipit:

@jiasli jiasli changed the title {Identity} Adopt latest changes from Azure Identity {Identity} Adopt latest changes from Azure Identity #10612 May 13, 2020
@jiasli jiasli merged commit 0be7498 into Azure:identity May 13, 2020
@jiasli jiasli deleted the identity-10612 branch May 13, 2020 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants