Skip to content

Commit 679a4e4

Browse files
atm - Make sure sync method of access token handler is not invoked
1 parent 8a4b7af commit 679a4e4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

access-token-management/src/AccessTokenManagement/AccessTokenHandler.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ public AccessTokenHandler(
4040
/// <returns></returns>
4141
protected abstract Task<ClientCredentialsToken> GetAccessTokenAsync(bool forceRenewal, CancellationToken cancellationToken);
4242

43+
/// <inheritdoc/>
44+
protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken)
45+
{
46+
throw new NotSupportedException(
47+
"The (synchronous) Send() method is not supported. Please use the async SendAsync variant. ");
48+
}
49+
4350
/// <inheritdoc/>
4451
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
4552
{

0 commit comments

Comments
 (0)