zero user crud works (a bit clunky, but heyyy)

This commit is contained in:
2022-02-12 21:16:31 +01:00
parent c72300c168
commit c3e7ed6954
13 changed files with 218 additions and 27 deletions
+3 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Authentication;
using FluentValidation;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Configuration;
@@ -17,6 +18,7 @@ internal class ZeroIdentityModule : ZeroModule
services.AddZeroIdentity<ZeroUser, ZeroUserRole>();
services.Replace<IUserClaimsPrincipalFactory<ZeroUser>, ZeroBackofficeClaimsPrincipalFactory<ZeroUser, ZeroUserRole>>();
services.Replace<IUserStore<ZeroUser>, RavenCoreUserStore<ZeroUser, ZeroUserRole>>(ServiceLifetime.Scoped);
services.AddScoped<IValidator<ZeroUser>, BackofficeUserValidator>();
services.Replace<IRoleStore<ZeroUserRole>, RavenCoreRoleStore<ZeroUserRole>>(ServiceLifetime.Scoped);
services.AddSingleton<IAuthenticationSchemeProvider, ZeroAuthenticationSchemeProvider>();