DeviceHub: /device WS with bearer auth + hello/hello_ack + ping/pong

This commit is contained in:
2026-06-11 21:55:33 +00:00
parent 4dc48bd9fd
commit 9023509b01
4 changed files with 233 additions and 0 deletions
+5
View File
@@ -1,5 +1,6 @@
using backend.Auth;
using backend.Data;
using backend.DeviceHub;
using backend.Devices;
using backend.Install;
using backend.Pairing;
@@ -41,6 +42,7 @@ builder.Services.AddSingleton<backend.Tools.ITool, backend.Tools.SetVolumeTool>(
builder.Services.AddSingleton<backend.Tools.ToolRegistry>();
builder.Services.AddScoped<backend.Realtime.RealtimeSessionFactory>();
builder.Services.AddSingleton<backend.DeviceHub.DeviceRegistry>();
builder.Services.AddScoped<backend.DeviceHub.DeviceAuth>();
var app = builder.Build();
@@ -69,6 +71,9 @@ app.MapInstallEndpoints();
app.MapGet("/health", () => Results.Ok(new { ok = true }));
app.UseWebSockets();
app.MapDeviceHub();
app.Run();
public partial class Program { }