-
Notifications
You must be signed in to change notification settings - Fork 7
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
AzureIdentityAccessTokenProvider.GetAuthorizationTokenAsync #93
Comments
Thanks for reporting this @schuettecarsten |
That's correct, but the ToArray() call is there in the old code also. Its directly inside the |
Optimized version with less allocations, what do you think @baywet?
Yes, I can create a pull request on this. |
The PR is ready, please review carefully, I've added two more minor changes. |
Method
AzureIdentityAccessTokenProvider.GetAuthorizationTokenAsync
will add the current uri to the instance variable_scopes
. This is not thread-safe and might cause InvalidOperationExceptions because of collections that are modified concurrently. It also uses the current method parameteruri
to initialize the instance variable. Next time, when a different uri is used, scopes might be wrong.My exception:
Current implementation:
Idea to fix this is to not modify
_scopes
instance variable but use a local array:The text was updated successfully, but these errors were encountered: