Browse Source

The new tenant requires the default IdentityOptions

pull/170/head
cKey 5 years ago
parent
commit
f6891a1e8f
  1. 11
      aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs

11
aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs

@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@ -154,6 +155,16 @@ namespace AuthServer.Host
options.InstanceName = configuration["Redis:InstanceName"];
});
// 增加配置文件定义,在新建租户时需要
Configure<IdentityOptions>(options =>
{
var identityConfiguration = configuration.GetSection("Identity");
if (identityConfiguration.Exists())
{
identityConfiguration.Bind(options);
}
});
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AuthIdentityServerModule>("AuthServer");

Loading…
Cancel
Save