using HopFrame.Database; using HopFrame.Security.Claims; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; namespace HopFrame.Security.Authentication; public static class HopFrameAuthenticationExtensions { public static AuthenticationBuilder AddHopFrameAuthentication(this IServiceCollection service) where TDbContext : HopDbContextBase { service.TryAddSingleton(); service.AddScoped>(); return service.AddAuthentication(HopFrameAuthentication.SchemeName).AddScheme>(HopFrameAuthentication.SchemeName, _ => {}); } }