-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Identity] Implement new protocol for all credentials #36882
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
Conversation
|
API change check APIView has identified API level changes in this PR and created following API reviews. |
c6754dd to
d7a9499
Compare
sdk/identity/azure-identity/azure/identity/_credentials/azd_cli.py
Outdated
Show resolved
Hide resolved
|
For each credential, let's add tests Btw, we don't need TokenCredential in corehttp. corehttp only has SupportsTokenInfo. |
d7a9499 to
473231c
Compare
Yep, for Can add additional isinstance checks for |
Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
a2da5b8 to
cf0e44c
Compare
sdk/identity/azure-identity/azure/identity/_internal/interactive.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
xiangyan99
left a comment
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.
Now the chained credential should take TokenProviders rather than TokenCredentials, right?
Also its get_token should call into get_token_info
(We will support the case that user adds SupportsTokenInfo cred into the chain)
Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
sdk/identity/azure-identity/azure/identity/_credentials/shared_cache.py
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/azure/identity/_internal/interactive.py
Outdated
Show resolved
Hide resolved
- Updated some typing - Propagated refresh_on in additional places - Propagated "token_type" for InteractiveCredential Signed-off-by: Paul Van Eck <[email protected]>
All credentials now implement the `SupportsTokenInfo/AsyncSupportsTokenInfo` protocol, by each having a `get_token_info` method implementation. This allows for more extensible authentication constructs. Signed-off-by: Paul Van Eck <[email protected]>
Based on: #36565
get_token_info.get_tokenwere parameterized to call bothget_tokenandget_token_info.azure-corebumped since we need to import the newSupportTokenInfoprotocol andAccessTokenInfoclass.