adjust token handling

This commit is contained in:
rootdarkarchon
2023-10-24 22:31:34 +02:00
parent 82cca2e035
commit fc9953bb8d
2 changed files with 14 additions and 1 deletions

View File

@@ -115,7 +115,7 @@ public class FileTransferOrchestrator : DisposableMediatorSubscriberBase
private async Task<HttpResponseMessage> SendRequestInternalAsync(HttpRequestMessage requestMessage,
CancellationToken? ct = null, HttpCompletionOption httpCompletionOption = HttpCompletionOption.ResponseContentRead)
{
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", await _tokenProvider.GetOrUpdateToken(ct!.Value).ConfigureAwait(false));
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _tokenProvider.GetToken());
if (requestMessage.Content != null && requestMessage.Content is not StreamContent && requestMessage.Content is not ByteArrayContent)
{