コード例 #1
0
        public static JTIdentityBuilder AddJTSignInManager <TSignInManager>(this JTIdentityBuilder builder)
            where TSignInManager : class
        {
            var jtType      = typeof(JTSignInManager <, ,>).MakeGenericType(builder.TenantType, builder.RoleType, builder.UserType);
            var managerType = typeof(SignInManager <>).MakeGenericType(builder.UserType);

            builder.Services.AddScoped(jtType, services => services.GetRequiredService(managerType));
            builder.AddSignInManager <TSignInManager>();
            return(builder);
        }