public void AddUserConnection(string user) { _onlineUsers.AddUser(JsonConvert.DeserializeObject <UserProfile>(user)); }
public void OnActionExecuting(ActionExecutingContext context) { OnlineUsers.AddUser(context.HttpContext.User.Identity.Name); }
public override Task ValidatePrincipal(CookieValidatePrincipalContext context) { OnlineUsers.AddUser(context.Principal.Identity.Name); return(base.ValidatePrincipal(context)); }