|
|
@ -16,6 +16,8 @@ using PackageName.CompanyName.ProjectName.SettingManagement; |
|
|
using Volo.Abp; |
|
|
using Volo.Abp; |
|
|
#if OpenIddict
|
|
|
#if OpenIddict
|
|
|
using Volo.Abp.OpenIddict; |
|
|
using Volo.Abp.OpenIddict; |
|
|
|
|
|
#elif IdentityServer4
|
|
|
|
|
|
using Volo.Abp.AspNetCore.Authentication.JwtBearer; |
|
|
#endif
|
|
|
#endif
|
|
|
using Volo.Abp.AspNetCore.MultiTenancy; |
|
|
using Volo.Abp.AspNetCore.MultiTenancy; |
|
|
using Volo.Abp.AspNetCore.Serilog; |
|
|
using Volo.Abp.AspNetCore.Serilog; |
|
|
@ -29,6 +31,7 @@ using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|
|
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|
|
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|
|
using Volo.Abp.Swashbuckle; |
|
|
using Volo.Abp.Swashbuckle; |
|
|
using LINGYUN.Abp.AspNetCore.HttpOverrides; |
|
|
using LINGYUN.Abp.AspNetCore.HttpOverrides; |
|
|
|
|
|
using LINGYUN.Abp.Identity.Session.AspNetCore; |
|
|
|
|
|
|
|
|
namespace PackageName.CompanyName.ProjectName; |
|
|
namespace PackageName.CompanyName.ProjectName; |
|
|
|
|
|
|
|
|
@ -53,11 +56,14 @@ namespace PackageName.CompanyName.ProjectName; |
|
|
typeof(AbpTextTemplatingEntityFrameworkCoreModule), |
|
|
typeof(AbpTextTemplatingEntityFrameworkCoreModule), |
|
|
#if OpenIddict
|
|
|
#if OpenIddict
|
|
|
typeof(AbpOpenIddictAspNetCoreModule), |
|
|
typeof(AbpOpenIddictAspNetCoreModule), |
|
|
|
|
|
#elif IdentityServer4
|
|
|
|
|
|
typeof(AbpAspNetCoreAuthenticationJwtBearerModule), |
|
|
#endif
|
|
|
#endif
|
|
|
typeof(AbpCachingStackExchangeRedisModule), |
|
|
typeof(AbpCachingStackExchangeRedisModule), |
|
|
typeof(AbpDistributedLockingModule), |
|
|
typeof(AbpDistributedLockingModule), |
|
|
typeof(AbpAspNetCoreMvcWrapperModule), |
|
|
typeof(AbpAspNetCoreMvcWrapperModule), |
|
|
typeof(AbpAspNetCoreHttpOverridesModule), |
|
|
typeof(AbpAspNetCoreHttpOverridesModule), |
|
|
|
|
|
typeof(AbpIdentitySessionAspNetCoreModule), |
|
|
typeof(AbpSwashbuckleModule), |
|
|
typeof(AbpSwashbuckleModule), |
|
|
typeof(AbpAutofacModule) |
|
|
typeof(AbpAutofacModule) |
|
|
)] |
|
|
)] |
|
|
@ -109,7 +115,10 @@ public partial class ProjectNameHttpApiHostModule : AbpModule |
|
|
app.UseAuthentication(); |
|
|
app.UseAuthentication(); |
|
|
#if OpenIddict
|
|
|
#if OpenIddict
|
|
|
app.UseAbpOpenIddictValidation(); |
|
|
app.UseAbpOpenIddictValidation(); |
|
|
|
|
|
#elif IdentityServer4
|
|
|
|
|
|
app.UseJwtTokenMiddleware(); |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
app.UseAbpSession(); |
|
|
app.UseDynamicClaims(); |
|
|
app.UseDynamicClaims(); |
|
|
app.UseMultiTenancy(); |
|
|
app.UseMultiTenancy(); |
|
|
app.UseAuthorization(); |
|
|
app.UseAuthorization(); |
|
|
|