using Microsoft.AspNetCore.SignalR; namespace HRM.UI.Realtime { /// /// Ties a connection to the app's own user id (the "UserID" claim of the JWT), so /// IRealtimePublisher.ToUserAsync reaches every tab that user has open. /// public class UserIdClaimProvider : IUserIdProvider { public string GetUserId(HubConnectionContext connection) { return connection.User?.FindFirst("UserID")?.Value; } } }