feature: Upload Online Attachments

This commit is contained in:
Gary Sharp
2025-06-15 17:56:13 +10:00
parent 6e2c36d4ae
commit cc1f224456
9 changed files with 395 additions and 22 deletions
@@ -0,0 +1,18 @@
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
namespace Disco.Services.Interop.DiscoServices
{
internal class OnlineServicesAuthenticatedHandler : HttpClientHandler
{
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var token = await OnlineServicesAuthentication.GetTokenAsync();
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
return await base.SendAsync(request, cancellationToken);
}
}
}