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

Make all credential types mockable #43959

Closed
scottaddie opened this issue May 9, 2024 · 3 comments · Fixed by #43962
Closed

Make all credential types mockable #43959

scottaddie opened this issue May 9, 2024 · 3 comments · Fixed by #43962
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.

Comments

@scottaddie
Copy link
Member

While reading through #20911, I noticed that only some credential types in the Azure Identity library expose protected, parameterless constructors and are therefore mockable. This is a tracking issue to update the affected credential types accordingly, to adhere to Azure SDK for .NET mocking guidelines.

@scottaddie scottaddie added Client This issue points to a problem in the data-plane of the library. Azure.Identity feature-request This issue requires a new behavior in the product in order be resolved. labels May 9, 2024
@jsquire
Copy link
Member

jsquire commented May 9, 2024

@scottaddie: Can you help us understand for what the scenarios are where mocking TokenCredential is not sufficient? There's no API in any Azure SDK package that is credential based but does not take TokenCredential.

@scottaddie
Copy link
Member Author

@jsquire We have customers who want to test code that didn't accept/use the TokenCredential abstraction and instead accepted the derived type. I linked to an issue in my original comment that shows an example.

My bigger concern is that we're inconsistent across credential types.

@jsquire
Copy link
Member

jsquire commented May 10, 2024

To be clear, I'm not opposed to the requested change, just trying to understand the scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants