Skip to content

[Identity] Update get_token method signatures - #34953

Closed
Paul Van Eck (pvaneck) wants to merge 1 commit into
Azure:mainfrom
pvaneck:identity-get-token-protocol
Closed

[Identity] Update get_token method signatures#34953
Paul Van Eck (pvaneck) wants to merge 1 commit into
Azure:mainfrom
pvaneck:identity-get-token-protocol

Conversation

@pvaneck

@pvaneck Paul Van Eck (pvaneck) commented Mar 27, 2024

Copy link
Copy Markdown
Member

Several get_token method signatures were updated to explicitly include the enable_cae keyword argument to match the TokenCredential protocol method signature.

This is similar to the changes made previously in #31047.

@azure-sdk

Copy link
Copy Markdown
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-identity

Several `get_token` method signatures were updated to include the
`enable_cae` keyword argument to match the TokenCredential protocol
method signature.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
https://learn.microsoft.com/entra/identity-platform/scopes-oidc.
:keyword str claims: not used by this credential; any value provided will be ignored.
:keyword str tenant_id: optional tenant to include in the token request.
:keyword bool enable_cae: Indicates whether to enable Continuous Access Evaluation (CAE) for the requested

@xiangyan99 Xiang Yan (xiangyan99) Apr 4, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we really use it?

It seems not make sense to explicitly list the argument then explicitly say not supported.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Based on discussion yesterday, I thought the agreement was to have our get_token implementations use matching signatures as the TokenCredential Protocol get_token.

The current signature mismatch is what is causing the PyCharm IDE to complain:
image

I agree it is weird to list it and not use it, but that's pretty much the nature of trying to match the signature for credentials with differing sets of capabilities. In this same credential, we do the same thing with claims.

We can sit on this PR for now as we solicit more feedback on if we should cater to the PyCharm type-checker. It definitely doesn't need to go into next week's release. MyPy is fine resolving our Credentials as TokenCredentials even without the exact signature match, so there is still a bit of uncertainty here on if we should make this change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My concern is if we explicitly say one argument is not supported.

Does that mean for the arguments that we don't explicitly say not supported means they are supported?

@github-actions

github-actions Bot commented Jun 7, 2024

Copy link
Copy Markdown
Contributor

Hi Paul Van Eck (@pvaneck). Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

1 similar comment
@github-actions

github-actions Bot commented Aug 9, 2024

Copy link
Copy Markdown
Contributor

Hi Paul Van Eck (@pvaneck). Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions Bot added the no-recent-activity There has been no recent activity on this issue. label Aug 9, 2024
@github-actions

Copy link
Copy Markdown
Contributor

Hi Paul Van Eck (@pvaneck). Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@github-actions github-actions Bot closed this Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Identity no-recent-activity There has been no recent activity on this issue.

Projects

Development

Successfully merging this pull request may close these issues.

3 participants