Skip to content

Commit

Permalink
atm - Make sure sync method of access token handler is not invoked
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwinvandervalk committed Feb 7, 2025
1 parent 8a4b7af commit 679a4e4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public AccessTokenHandler(
/// <returns></returns>
protected abstract Task<ClientCredentialsToken> GetAccessTokenAsync(bool forceRenewal, CancellationToken cancellationToken);

/// <inheritdoc/>
protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
{
throw new NotSupportedException(
"The (synchronous) Send() method is not supported. Please use the async SendAsync variant. ");
}

/// <inheritdoc/>
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
Expand Down

0 comments on commit 679a4e4

Please sign in to comment.