src/Newdtek.Master.Core/Identity/IdentityRegistrar.cs
(完整代码) 1KBusing Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
using Newdtek.Master.Authorization;
using Newdtek.Master.Authorization.Roles;
using Newdtek.Master.Authorization.Users;
using Newdtek.Master.Editions;
using Newdtek.Master.MultiTenancy;
namespace Newdtek.Master.Identity
{
public static class IdentityRegistrar
{
public static IdentityBuilder Register(IServiceCollection services)
{
services.AddLogging();
return services.AddAbpIdentity<Tenant, User, Role>()
.AddAbpTenantManager<TenantManager>()
.AddAbpUserManager<UserManager>()
.AddAbpRoleManager<RoleManager>()
.AddAbpEditionManager<EditionManager>()
.AddAbpUserStore<UserStore>()
.AddAbpRoleStore<RoleStore>()
.AddAbpLogInManager<LogInManager>()
.AddAbpSignInManager<SignInManager>()
.AddAbpSecurityStampValidator<SecurityStampValidator>()
.AddAbpUserClaimsPrincipalFactory<UserClaimsPrincipalFactory>()
.AddPermissionChecker<PermissionChecker>()
.AddDefaultTokenProviders();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。