From f55f57309fec705c4836fc885fef9d2549f1d637 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Sun, 21 Jun 2020 14:46:49 +0800 Subject: [PATCH] Use PreConfigure configure identityBuild --- .../AspNetCore/AbpIdentityAspNetCoreModule.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpIdentityAspNetCoreModule.cs b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpIdentityAspNetCoreModule.cs index 388c0849b7..c0e3031568 100644 --- a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpIdentityAspNetCoreModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpIdentityAspNetCoreModule.cs @@ -9,13 +9,17 @@ namespace Volo.Abp.Identity.AspNetCore )] public class AbpIdentityAspNetCoreModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) + public override void PreConfigureServices(ServiceConfigurationContext context) { - context.Services - .GetObject() - .AddDefaultTokenProviders() - .AddSignInManager(); + PreConfigure(builder => + { + builder.AddDefaultTokenProviders(); + builder.AddSignInManager(); + }); + } + public override void ConfigureServices(ServiceConfigurationContext context) + { //(TODO: Extract an extension method like IdentityBuilder.AddAbpSecurityStampValidator()) context.Services.AddScoped(); context.Services.AddScoped(typeof(SecurityStampValidator), provider => provider.GetService(typeof(AbpSecurityStampValidator)));