refactor: consolidate project structure by migrating authentication, identity, and shared UI components while removing legacy Web Client files.
This commit is contained in:
@@ -10,6 +10,10 @@ using NexusReader.Infrastructure.Services;
|
||||
using NexusReader.Infrastructure.Configuration;
|
||||
using Polly;
|
||||
using Polly.Retry;
|
||||
using NexusReader.Domain.Entities;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using NexusReader.Application.Security.Authorization;
|
||||
|
||||
namespace NexusReader.Infrastructure;
|
||||
|
||||
@@ -53,6 +57,14 @@ public static class DependencyInjection
|
||||
services.AddScoped<IKnowledgeService, KnowledgeService>();
|
||||
services.AddTransient<IAiGenerateQuizService, FakeAiGenerateQuizService>();
|
||||
services.AddTransient<IEpubService, EpubService>();
|
||||
|
||||
services.AddAuthorizationCore(options =>
|
||||
{
|
||||
options.AddPolicy("ProUser", policy => policy.Requirements.Add(new ProUserRequirement()));
|
||||
});
|
||||
|
||||
services.AddScoped<IAuthorizationHandler, ProUserHandler>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user