|
|
|
|
@ -1,4 +1,7 @@
|
|
|
|
|
using Volo.Abp.IdentityServer;
|
|
|
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Volo.Abp.Identity.AspNetCore;
|
|
|
|
|
using Volo.Abp.IdentityServer;
|
|
|
|
|
using Volo.Abp.Modularity;
|
|
|
|
|
using Volo.Abp.VirtualFileSystem;
|
|
|
|
|
|
|
|
|
|
@ -10,12 +13,29 @@ namespace Volo.Abp.Account.Web
|
|
|
|
|
)]
|
|
|
|
|
public class AbpAccountWebIdentityServerModule : AbpModule
|
|
|
|
|
{
|
|
|
|
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
|
|
|
|
{
|
|
|
|
|
context.Services.PreConfigure<AbpIdentityAspNetCoreOptions>(options =>
|
|
|
|
|
{
|
|
|
|
|
options.ConfigureAuthentication = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
|
|
|
{
|
|
|
|
|
Configure<VirtualFileSystemOptions>(options =>
|
|
|
|
|
{
|
|
|
|
|
options.FileSets.AddEmbedded<AbpAccountWebIdentityServerModule>("Volo.Abp.Account.Web");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//TODO: Try to reuse from AbpIdentityAspNetCoreModule
|
|
|
|
|
context.Services
|
|
|
|
|
.AddAuthentication(o =>
|
|
|
|
|
{
|
|
|
|
|
o.DefaultScheme = IdentityConstants.ApplicationScheme;
|
|
|
|
|
o.DefaultSignInScheme = IdentityConstants.ExternalScheme;
|
|
|
|
|
})
|
|
|
|
|
.AddIdentityCookies();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|