using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.SignalR;

namespace SolutionErp.Api.Hubs;

// JWT-authenticated hub. Users subscribe automatically to their own channel via
// Clients.User(userId) — SignalR resolves userId via IUserIdProvider (default
// uses ClaimTypes.NameIdentifier which our JWT sets to "sub").
[Authorize]
public class NotificationHub : Hub
{
    // Client-callable ping for heartbeat/debug. Clients auto-join their user
    // channel on connect — no explicit join method needed.
    public string Ping() => "pong";
}
