2using System.Threading.Tasks;
 
    4using Microsoft.AspNetCore.Authorization;
 
    5using Microsoft.AspNetCore.SignalR;
 
   19        where THubMethods : class
 
   48            await base.OnConnectedAsync();
 
 
   56            return base.OnDisconnectedAsync(exception);
 
 
 
Base class for Hub<T>s that want to map their connection IDs to Models.PermissionSets.
 
override async Task OnConnectedAsync()
 
override Task OnDisconnectedAsync(Exception? exception)
 
readonly IAuthenticationContext authenticationContext
The IAuthenticationContext for the ConnectionMappingHub<TChildHub, THubMethods>.
 
readonly IHubConnectionMapper< TChildHub, THubMethods > connectionMapper
The IHubConnectionMapper<THub, THubMethods> used to map connections.
 
ConnectionMappingHub(IHubConnectionMapper< TChildHub, THubMethods > connectionMapper, IAuthenticationContext authenticationContext)
Initializes a new instance of the ConnectionMappingHub<TParentHub, TClientMethods> class.
 
For creating and accessing authentication contexts.
 
Handles mapping connection IDs to Users for a given THub .
 
ValueTask UserConnected(IAuthenticationContext authenticationContext, THub hub, CancellationToken cancellationToken)
To be called when a hub connection is made.
 
void UserDisconnected(string connectionId)
To be called when a hub connection is terminated.