mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
be0edb0f94
Introduces IHubUserAccessor and its implementation to centralize user ID retrieval from SignalR HubCallerContext, replacing duplicated logic in ChatsHub, FriendsHub, and PresenceHub. Moves extension and mapping files to a Common directory, adds UserToUserDtoMappingAction for online status mapping, and implements OnlineUserStore with tests for tracking online users. Updates dependency injection and test code to use the new abstractions.
14 lines
490 B
C#
14 lines
490 B
C#
using Govor.Application.Services.Authentication;
|
|
|
|
namespace Govor.API.Common.Extensions;
|
|
|
|
public static class AddOptionExtensions
|
|
{
|
|
public static IServiceCollection AddOptionsConfiguration(this IServiceCollection services, IConfiguration configuration)
|
|
{
|
|
services.Configure<JwtAccessOption>(configuration.GetSection(nameof(JwtAccessOption)));
|
|
services.Configure<JwtRefreshOption>(configuration.GetSection(nameof(JwtRefreshOption)));
|
|
|
|
return services;
|
|
}
|
|
} |