Added automatic token refresh feature and login page

This commit is contained in:
2024-07-14 21:25:36 +02:00
parent a164a3d282
commit 7cd412b168
16 changed files with 164 additions and 25 deletions

View File

@@ -1,4 +1,5 @@
using HopFrame.Database;
using HopFrame.Security.Authentication;
using HopFrame.Web.Services;
using HopFrame.Web.Services.Implementation;
using Microsoft.AspNetCore.Builder;
@@ -10,6 +11,9 @@ public static class ServiceCollectionExtensions {
public static IServiceCollection AddHopFrameServices<TDbContext>(this IServiceCollection services) where TDbContext : HopDbContextBase {
services.AddHttpClient();
services.AddScoped<IAuthService, AuthService<TDbContext>>();
services.AddTransient<AuthMiddleware>();
services.AddHopFrameAuthentication<TDbContext>();
return services;
}