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

atm - Make sure sync method of access token handler is not invoked #90

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

Erwinvandervalk
Copy link
Contributor

What issue does this PR address?

The Send() method of the AccessTokenHandler now fails with a NotSupportedException, rather than fail silently.

The synchronous Send() method of the access token handler was never implemented. Calling it would cause it to do nothing. Unfortunately we can't implement this method, because we're calling into other asynchronous code. We also can't implement it by calling .GetAwaiter().GetResult() as this might have many negative side effects such as deadlocks.

The origin of this issue is that the SendAsync() was already present in .Net core 1.0 but the Send method was introduced later.

fixes: #28

@Erwinvandervalk Erwinvandervalk added area/access-token-management Issues related to Access Token Management impact/non-breaking The fix or change will not be a breaking one labels Feb 5, 2025
@Erwinvandervalk Erwinvandervalk self-assigned this Feb 5, 2025
@Erwinvandervalk Erwinvandervalk force-pushed the ev/sync-access-token-handler branch from 98aacaa to 679a4e4 Compare February 7, 2025 13:19
@Erwinvandervalk Erwinvandervalk merged commit 9e8638e into main Feb 7, 2025
9 checks passed
@Erwinvandervalk Erwinvandervalk deleted the ev/sync-access-token-handler branch February 7, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/access-token-management Issues related to Access Token Management impact/non-breaking The fix or change will not be a breaking one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AccessTokenHandler does not support sync methods
2 participants