Suppose in some class library I have access to a specific HubContext
:
IHubContext ctx = connectionManager.GetHubContext<MyAwesomeHub>();
How do I get access to the current authenticated .User
property?
You can't. The GetHubContext method is normally used for sending messages from a background thread to a client (or many/all clients) so by definition won't have a SignalR user backing it.