Browse Source

Updated swagger oidc configuration

pull/216/head
Galip Tolga Erdem 3 years ago
parent
commit
95897c0dc4
  1. 16
      apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs
  2. 29
      gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs
  3. 5
      gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json
  4. 123
      gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json
  5. 34
      gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs
  6. 7
      gateways/web/src/EShopOnAbp.WebGateway/appsettings.json
  7. 73
      gateways/web/src/EShopOnAbp.WebGateway/yarp.json
  8. 20
      services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/AdministrationServiceApplicationContractsModule.cs
  9. 6
      services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/EShopOnAbp.AdministrationService.Application.Contracts.csproj
  10. 4
      services/administration/src/EShopOnAbp.AdministrationService.Domain/AdministrationServiceDomainModule.cs
  11. 1
      services/administration/src/EShopOnAbp.AdministrationService.Domain/EShopOnAbp.AdministrationService.Domain.csproj
  12. 35
      services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs
  13. 6
      services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/DbMigrations/AdministrationServiceDataSeedContributor.cs
  14. 1
      services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj
  15. 1
      services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json
  16. 12
      services/basket/src/EShopOnAbp.BasketService/BasketServiceModule.cs
  17. 4
      services/basket/src/EShopOnAbp.BasketService/appsettings.json
  18. 19
      services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/CatalogServiceHttpApiHostModule.cs
  19. 4
      services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json
  20. 19
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs
  21. 4
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json
  22. 19
      services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs
  23. 4
      services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json
  24. 17
      services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/OrderingServiceHttpApiHostModule.cs
  25. 4
      services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json
  26. 2
      services/payment/src/EShopOnAbp.PaymentService.Domain/EShopOnAbp.PaymentService.Domain.csproj
  27. 17
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/PaymentServiceHttpApiHostModule.cs
  28. 4
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json
  29. 1
      shared/EShopOnAbp.Keycloak.DbMigrator/EShopOnAbp.Keycloak.DbMigrator.csproj
  30. 1
      shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbp.Shared.Hosting.AspNetCore.csproj
  31. 15
      shared/EShopOnAbp.Shared.Hosting.AspNetCore/SerilogConfigurationHelper.cs
  32. 15
      shared/EShopOnAbp.Shared.Hosting.AspNetCore/SwaggerConfigurationHelper.cs
  33. 2
      shared/EShopOnAbp.Shared.Hosting.Gateways/EShopOnAbp.Shared.Hosting.Gateways.csproj
  34. 1
      shared/EShopOnAbp.Shared.Hosting.Gateways/YarpSwaggerUIBuilderExtensions.cs
  35. 2
      shared/EShopOnAbp.Shared.Hosting.Microservices/EShopOnAbp.Shared.Hosting.Microservices.csproj
  36. 15
      shared/EShopOnAbp.Shared.Hosting.Microservices/EShopOnAbpSharedHostingMicroservicesModule.cs
  37. 3
      shared/EShopOnAbp.Shared.Hosting/EShopOnAbp.Shared.Hosting.csproj
  38. 1
      shared/EShopOnAbp.Shared.Hosting/EShopOnAbpSharedHostingModule.cs
  39. 1
      shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.csproj

16
apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs

@ -221,17 +221,13 @@ public class EShopOnAbpAuthServerModule : AbpModule
private void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration)
{
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new Dictionary<string, string>
{
/* Requested scopes for authorization code request and descriptions for swagger UI only */
{
"AccountService",
"Account Service API"
},
},
authority: configuration["AuthServer:Authority"]!,
scopes: ["AccountService"],
flows: ["authorization_code"],
discoveryEndpoint: configuration["AuthServer:MetadataAddress"],
apiTitle: "Account Service API"
);
}

29
gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs

@ -8,6 +8,7 @@ using Microsoft.Extensions.Hosting;
using System.Collections.Generic;
using Volo.Abp;
using Volo.Abp.Modularity;
using Volo.Abp.Swashbuckle;
namespace EShopOnAbp.WebPublicGateway;
@ -21,25 +22,19 @@ public class EShopOnAbpWebPublicGatewayModule : AbpModule
var configuration = context.Services.GetConfiguration();
var hostingEnvironment = context.Services.GetHostingEnvironment();
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{ "AccountService", "Account Service API" },
{ "IdentityService", "Identity Service API" },
{ "AdministrationService", "Administration Service API" },
{ "CatalogService", "Catalog Service API" },
{ "BasketService", "Basket Service API" },
{ "PaymentService", "Payment Service API" },
{ "OrderingService", "Ordering Service API" },
{ "CmskitService", "Cmskit Service API" },
},
apiTitle: "WebPublic Gateway"
authority: configuration["AuthServer:Authority"]!,
scopes:
[
/* Requested scopes for authorization code request and descriptions for swagger UI only */
"IdentityService", "AdministrationService", "CatalogService", "BasketService", "PaymentService",
"OrderingService", "CmskitService"
],
flows: [AbpSwaggerOidcFlows.AuthorizationCode],
apiTitle: "Web Gateway API",
discoveryEndpoint: configuration["AuthServer:MetadataAddress"]
);
// context.Services.AddReverseProxy()
// .LoadFromConfig(configuration.GetSection("ReverseProxy"));
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)

5
gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json

@ -19,8 +19,5 @@
"AllowedHosts": "*",
"Redis": {
"Configuration": "localhost:6379"
},
"ElasticSearch": {
"Url": "http://localhost:9200"
}
}
}

123
gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json

@ -1,29 +1,68 @@
{
"ReverseProxy": {
"Routes": {
"Account Service": {
"ClusterId": "accountCluster",
"AbpApi": {
"ClusterId": "administrationCluster",
"Match": {
"Path": "/api/account/{**everything}"
"Path": "/api/abp/{**catch-all}"
}
},
"Administration Service": {
"ClusterId": "administrationCluster",
"Identity Service": {
"ClusterId": "identityCluster",
"Match": {
"Path": "/api/identity/{**everything}"
}
},
"Identity Service Swagger": {
"ClusterId": "identityCluster",
"Match": {
"Path": "/swagger-json/Identity/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Identity" }
]
},
"FeatureManagement": {
"ClusterId": "feature-management-cluster",
"Match": {
"Path": "/api/feature-management/{**everything}"
}
},
"PermissionManagement": {
"ClusterId": "permission-management-cluster",
"Match": {
"Path": "/api/abp/{**everything}"
"Path": "/api/permission-management/{**everything}"
}
},
"SettingManagement": {
"ClusterId": "setting-management-cluster",
"Match": {
"Path": "/api/setting-management/{**everything}"
}
},
"Administration Service Swagger": {
"ClusterId": "administrationCluster",
"Match": {
"Path": "/swagger-json/Administration/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Administration" }
]
},
"Catalog Service": {
"ClusterId": "catalogCluster",
"Match": {
"Path": "/api/catalog/{**everything}"
}
},
"Basket Service": {
"ClusterId": "basketCluster",
"Catalog Service Swagger": {
"ClusterId": "catalogCluster",
"Match": {
"Path": "/api/basket/{**everything}"
}
"Path": "/swagger-json/Catalog/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Catalog" }
]
},
"Ordering Service": {
"ClusterId": "orderingCluster",
@ -31,11 +70,14 @@
"Path": "/api/ordering/{**everything}"
}
},
"Payment Service": {
"ClusterId": "paymentCluster",
"Ordering Service Swagger": {
"ClusterId": "orderingCluster",
"Match": {
"Path": "/api/payment/{**everything}"
}
"Path": "/swagger-json/Ordering/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Ordering" }
]
},
"Cmskit Service": {
"ClusterId": "cmskitCluster",
@ -43,31 +85,21 @@
"Path": "/api/cmskit/{**everything}"
}
},
"Cmskit Public Service": {
"Cmskit Service Swagger": {
"ClusterId": "cmskitCluster",
"Match": {
"Path": "/api/cms-kit-public/{**everything}"
}
},
"Cmskit Admin Service": {
"ClusterId": "cmskitCluster",
"Match": {
"Path": "/api/cms-kit-admin/{**everything}"
}
},
"product-picture-route": {
"ClusterId": "productPictureCluster",
"Match": {
"Path": "/product-images/{**everything}",
"Methods": [ "GET" ]
}
"Path": "/swagger-json/Cmskit/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Cmskit" }
]
}
},
"Clusters": {
"accountCluster": {
"identityCluster": {
"Destinations": {
"destination1": {
"Address": "https://localhost:44330"
"Address": "https://localhost:44351"
}
}
},
@ -78,31 +110,31 @@
}
}
},
"catalogCluster": {
"permission-management-cluster": {
"Destinations": {
"destination1": {
"Address": "https://localhost:44354"
"Address": "https://localhost:44353"
}
}
},
"basketCluster": {
"setting-management-cluster": {
"Destinations": {
"destination1": {
"Address": "https://localhost:44355"
"Address": "https://localhost:44353"
}
}
},
"orderingCluster": {
},
"catalogCluster": {
"Destinations": {
"destination1": {
"Address": "https://localhost:44356"
"Address": "https://localhost:44354"
}
}
},
"paymentCluster": {
"orderingCluster": {
"Destinations": {
"destination1": {
"Address": "https://localhost:44357"
"Address": "https://localhost:44356"
}
}
},
@ -112,14 +144,7 @@
"Address": "https://localhost:44358"
}
}
},
"productPictureCluster": {
"Destinations": {
"destination1": {
"Address": "https://localhost:44354"
}
}
}
}
}
}
}

34
gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs

@ -10,6 +10,8 @@ using System.Collections.Generic;
using System.Linq;
using Volo.Abp;
using Volo.Abp.Modularity;
using Volo.Abp.Swashbuckle;
using Yarp.ReverseProxy.Configuration;
namespace EShopOnAbp.WebGateway;
@ -23,22 +25,18 @@ public class EShopOnAbpWebGatewayModule : AbpModule
var configuration = context.Services.GetConfiguration();
var hostingEnvironment = context.Services.GetHostingEnvironment();
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{"AccountService", "Account Service API"},
{"IdentityService", "Identity Service API"},
{"AdministrationService", "Administration Service API"},
{"CatalogService", "Catalog Service API"},
{"BasketService", "Basket Service API"},
{"PaymentService", "Payment Service API"},
{"OrderingService", "Ordering Service API"},
{"CmskitService", "Cmskit Service API"},
},
apiTitle: "Web Gateway"
authority: configuration["AuthServer:Authority"]!,
scopes:
[
/* Requested scopes for authorization code request and descriptions for swagger UI only */
"IdentityService", "AdministrationService", "CatalogService", "BasketService", "PaymentService",
"OrderingService", "CmskitService"
],
flows: ["authorization_code"],
apiTitle: "Web Gateway API",
discoveryEndpoint: configuration["AuthServer:MetadataAddress"]
);
context.Services.AddCors(options =>
@ -70,6 +68,7 @@ public class EShopOnAbpWebGatewayModule : AbpModule
{
app.UseDeveloperExceptionPage();
}
app.UseCorrelationId();
app.UseAbpSerilogEnrichers();
app.UseCors();
@ -80,9 +79,6 @@ public class EShopOnAbpWebGatewayModule : AbpModule
.AddRedirect("^(|\\|\\s+)$", "/swagger"));
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapReverseProxy();
});
app.UseEndpoints(endpoints => { endpoints.MapReverseProxy(); });
}
}

7
gateways/web/src/EShopOnAbp.WebGateway/appsettings.json

@ -6,8 +6,8 @@
"AuthServer": {
"Authority": "http://localhost:8080/realms/master",
"RequireHttpsMetadata": "true",
"SwaggerClientId": "WebGateway_Swagger",
"SwaggerClientSecret": "1q2w3e*"
"MetadataAddress": "http://localhost:8080/realms/master",
"SwaggerClientId": "WebGateway_Swagger"
},
"Logging": {
"LogLevel": {
@ -20,8 +20,5 @@
"Redis": {
"Configuration": "localhost:6379"
},
"ElasticSearch": {
"Url": "http://localhost:9200"
}
}

73
gateways/web/src/EShopOnAbp.WebGateway/yarp.json

@ -1,10 +1,10 @@
{
"ReverseProxy": {
"Routes": {
"Account Service": {
"ClusterId": "accountCluster",
"AbpApi": {
"ClusterId": "administrationCluster",
"Match": {
"Path": "/api/account/{**everything}"
"Path": "/api/abp/{**catch-all}"
}
},
"Identity Service": {
@ -13,57 +13,89 @@
"Path": "/api/identity/{**everything}"
}
},
"Administration Service": {
"ClusterId": "administrationCluster",
"Identity Service Swagger": {
"ClusterId": "identityCluster",
"Match": {
"Path": "/api/abp/{**everything}"
}
"Path": "/swagger-json/Identity/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Identity" }
]
},
"feature-management-route": {
"FeatureManagement": {
"ClusterId": "feature-management-cluster",
"Match": {
"Path": "/api/feature-management/{**everything}"
}
},
"permission-management-route": {
"PermissionManagement": {
"ClusterId": "permission-management-cluster",
"Match": {
"Path": "/api/permission-management/{**everything}"
}
},
"setting-management-route": {
"SettingManagement": {
"ClusterId": "setting-management-cluster",
"Match": {
"Path": "/api/setting-management/{**everything}"
}
},
"Administration Service Swagger": {
"ClusterId": "administrationCluster",
"Match": {
"Path": "/swagger-json/Administration/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Administration" }
]
},
"Catalog Service": {
"ClusterId": "catalogCluster",
"Match": {
"Path": "/api/catalog/{**everything}"
}
},
"Catalog Service Swagger": {
"ClusterId": "catalogCluster",
"Match": {
"Path": "/swagger-json/Catalog/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Catalog" }
]
},
"Ordering Service": {
"ClusterId": "orderingCluster",
"Match": {
"Path": "/api/ordering/{**everything}"
}
},
"Ordering Service Swagger": {
"ClusterId": "orderingCluster",
"Match": {
"Path": "/swagger-json/Ordering/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Ordering" }
]
},
"Cmskit Service": {
"ClusterId": "cmskitCluster",
"Match": {
"Path": "/api/cmskit/{**everything}"
}
},
"Cmskit Service Swagger": {
"ClusterId": "cmskitCluster",
"Match": {
"Path": "/swagger-json/Cmskit/swagger/v1/swagger.json"
},
"Transforms": [
{ "PathRemovePrefix": "/swagger-json/Cmskit" }
]
}
},
"Clusters": {
"accountCluster": {
"Destinations": {
"destination1": {
"Address": "https://localhost:44330"
}
}
},
"identityCluster": {
"Destinations": {
"destination1": {
@ -78,13 +110,6 @@
}
}
},
"feature-management-cluster": {
"Destinations": {
"destination1": {
"Address": "https://localhost:44353"
}
}
},
"permission-management-cluster": {
"Destinations": {
"destination1": {

20
services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/AdministrationServiceApplicationContractsModule.cs

@ -1,24 +1,22 @@
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using EShopOnAbp.CatalogService;
using EShopOnAbp.OrderingService;
using EShopOnAbp.CmskitService;
// using EShopOnAbp.CatalogService;
// using EShopOnAbp.OrderingService;
// using EShopOnAbp.CmskitService;
namespace EShopOnAbp.AdministrationService
{
[DependsOn(
typeof(CatalogServiceApplicationContractsModule),
typeof(AdministrationServiceDomainSharedModule),
typeof(AbpPermissionManagementApplicationContractsModule),
typeof(AbpSettingManagementApplicationContractsModule),
typeof(OrderingServiceApplicationContractsModule),
typeof(CmskitServiceApplicationContractsModule)
typeof(AbpSettingManagementApplicationContractsModule)
// typeof(CatalogServiceApplicationContractsModule),
// typeof(OrderingServiceApplicationContractsModule),
// typeof(CmskitServiceApplicationContractsModule)
)]
public class AdministrationServiceApplicationContractsModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
}
}
}
}

6
services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/EShopOnAbp.AdministrationService.Application.Contracts.csproj

@ -7,9 +7,9 @@
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Domain.Shared\EShopOnAbp.AdministrationService.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.Application.Contracts\EShopOnAbp.CatalogService.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\ordering\src\EShopOnAbp.OrderingService.Application.Contracts\EShopOnAbp.OrderingService.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\cmskit\src\EShopOnAbp.CmskitService.Application.Contracts\EShopOnAbp.CmskitService.Application.Contracts.csproj" />
<!-- <ProjectReference Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.Application.Contracts\EShopOnAbp.CatalogService.Application.Contracts.csproj" />-->
<!-- <ProjectReference Include="..\..\..\ordering\src\EShopOnAbp.OrderingService.Application.Contracts\EShopOnAbp.OrderingService.Application.Contracts.csproj" />-->
<!-- <ProjectReference Include="..\..\..\cmskit\src\EShopOnAbp.CmskitService.Application.Contracts\EShopOnAbp.CmskitService.Application.Contracts.csproj" />-->
</ItemGroup>

4
services/administration/src/EShopOnAbp.AdministrationService.Domain/AdministrationServiceDomainModule.cs

@ -2,7 +2,6 @@
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.Identity;
using Volo.Abp.PermissionManagement.IdentityServer;
using Volo.Abp.SettingManagement;
namespace EShopOnAbp.AdministrationService
@ -11,8 +10,7 @@ namespace EShopOnAbp.AdministrationService
typeof(AdministrationServiceDomainSharedModule),
typeof(AbpSettingManagementDomainModule),
typeof(AbpAuditLoggingDomainModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpPermissionManagementDomainIdentityServerModule)
typeof(AbpPermissionManagementDomainIdentityModule)
)]
public class AdministrationServiceDomainModule : AbpModule
{

1
services/administration/src/EShopOnAbp.AdministrationService.Domain/EShopOnAbp.AdministrationService.Domain.csproj

@ -12,7 +12,6 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.PermissionManagement.Domain" Version="8.0.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="8.0.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="8.0.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="8.0.0" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="8.0.0" />
</ItemGroup>

35
services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs

@ -12,10 +12,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
using Volo.Abp.Http.Client.IdentityModel.Web;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Security.Claims;
using Volo.Abp.SettingManagement;
namespace EShopOnAbp.AdministrationService;
@ -25,7 +27,6 @@ namespace EShopOnAbp.AdministrationService;
typeof(AdministrationServiceEntityFrameworkCoreModule),
typeof(EShopOnAbpSharedHostingMicroservicesModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
typeof(AbpIdentityHttpApiClientModule)
)]
public class AdministrationServiceHttpApiHostModule : AbpModule
@ -36,16 +37,19 @@ public class AdministrationServiceHttpApiHostModule : AbpModule
JwtBearerConfigurationHelper.Configure(context, "AdministrationService");
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{"AdministrationService", "Administration Service API"}
},
authority: configuration["AuthServer:Authority"]!,
scopes: ["AdministrationService"],
flows: ["authorization_code"],
discoveryEndpoint: configuration["AuthServer:MetadataAddress"],
apiTitle: "Administration Service API"
);
context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
context.Services.AddCors(options =>
{
@ -53,7 +57,7 @@ public class AdministrationServiceHttpApiHostModule : AbpModule
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
configuration["App:CorsOrigins"]!
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
@ -65,6 +69,16 @@ public class AdministrationServiceHttpApiHostModule : AbpModule
.AllowCredentials();
});
});
Configure<PermissionManagementOptions>(options =>
{
options.IsDynamicPermissionStoreEnabled = true;
});
Configure<SettingManagementOptions>(options =>
{
options.IsDynamicSettingStoreEnabled = true;
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
@ -91,7 +105,6 @@ public class AdministrationServiceHttpApiHostModule : AbpModule
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Administration Service API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
// options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
});
app.UseAbpSerilogEnrichers();
app.UseAuditing();

6
services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/DbMigrations/AdministrationServiceDataSeedContributor.cs

@ -25,8 +25,8 @@ public class AdministrationServiceDataSeedContributor : IDataSeedContributor, IT
private async Task SeedClientCredentialPermissionsAsync()
{
await _permissionManager.SetAsync(IdentityUsersDefaultPermission, "C", "EShopOnAbp_AdministrationService", true);
await _permissionManager.SetAsync(IdentityUsersDefaultPermission, "C", "EShopOnAbp_CmskitService", true);
await _permissionManager.SetAsync(IdentityUsersLookupPermission, "C", "EShopOnAbp_CmskitService", true);
// await _permissionManager.SetAsync(IdentityUsersDefaultPermission, "C", "EShopOnAbp_AdministrationService", true);
// await _permissionManager.SetAsync(IdentityUsersDefaultPermission, "C", "EShopOnAbp_CmskitService", true);
// await _permissionManager.SetAsync(IdentityUsersLookupPermission, "C", "EShopOnAbp_CmskitService", true);
}
}

1
services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj

@ -15,7 +15,6 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="8.0.0" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="8.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="8.0.0" />
</ItemGroup>
<ItemGroup>

1
services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json

@ -6,6 +6,7 @@
"AuthServer": {
"Authority": "http://localhost:8080/realms/master",
"RequireHttpsMetadata": "false",
"MetadataAddress": "http://localhost:8080/realms/master",
"SwaggerClientId": "SwaggerClient"
},
"RemoteServices": {

12
services/basket/src/EShopOnAbp.BasketService/BasketServiceModule.cs

@ -110,14 +110,12 @@ public class BasketServiceModule : AbpModule
private void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration)
{
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{"BasketService", "Basket Service API"}
},
authority: configuration["AuthServer:Authority"]!,
scopes: ["BasketService"],
flows: ["authorization_code"],
discoveryEndpoint: configuration["AuthServer:MetadataAddress"],
apiTitle: "Basket Service API"
);
}

4
services/basket/src/EShopOnAbp.BasketService/appsettings.json

@ -6,8 +6,8 @@
"AuthServer": {
"Authority": "http://localhost:8080/realms/master",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "WebGateway_Swagger",
"SwaggerClientSecret": "1q2w3e*"
"MetadataAddress": "http://localhost:8080/realms/master",
"SwaggerClientId": "WebGateway_Swagger"
},
"RemoteServices": {
"Catalog": {

19
services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/CatalogServiceHttpApiHostModule.cs

@ -34,16 +34,14 @@ public class CatalogServiceHttpApiHostModule : AbpModule
JwtBearerConfigurationHelper.Configure(context, "CatalogService");
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{ "CatalogService", "Catalog Service API" }
},
apiTitle: "Catalog Service API"
);
authority: configuration["AuthServer:Authority"]!,
scopes: ["CatalogService"],
flows: ["authorization_code"],
discoveryEndpoint: configuration["AuthServer:MetadataAddress"],
apiTitle: "Catalog Service API"
);
context.Services.AddCors(options =>
{
@ -51,7 +49,7 @@ public class CatalogServiceHttpApiHostModule : AbpModule
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
configuration["App:CorsOrigins"]!
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
@ -110,7 +108,6 @@ public class CatalogServiceHttpApiHostModule : AbpModule
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Catalog Service API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
});
app.UseAbpSerilogEnrichers();
app.UseAuditing();

4
services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json

@ -6,8 +6,8 @@
"AuthServer": {
"Authority": "http://localhost:8080/realms/master",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "WebGateway_Swagger",
"SwaggerClientSecret": "1q2w3e*"
"MetadataAddress": "http://localhost:8080/realms/master",
"SwaggerClientId": "WebGateway_Swagger"
},
"Logging": {
"LogLevel": {

19
services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs

@ -42,16 +42,14 @@ public class CmskitServiceHttpApiHostModule : AbpModule
var configuration = context.Services.GetConfiguration();
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string>
{
{ "CmskitService", "Cmskit Service API" }
},
apiTitle: "Cmskit Service API"
);
authority: configuration["AuthServer:Authority"]!,
scopes: ["CmskitService"],
flows: ["authorization_code"],
discoveryEndpoint: configuration["AuthServer:MetadataAddress"],
apiTitle: "Cmskit Service API"
);
context.Services.AddCors(options =>
{
@ -59,7 +57,7 @@ public class CmskitServiceHttpApiHostModule : AbpModule
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
configuration["App:CorsOrigins"]!
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
@ -122,7 +120,6 @@ public class CmskitServiceHttpApiHostModule : AbpModule
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Cmskit Service API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
});
app.UseAbpSerilogEnrichers();
app.UseAuditing();

4
services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json

@ -6,8 +6,8 @@
"AuthServer": {
"Authority": "http://localhost:8080/realms/master",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "WebGateway_Swagger",
"SwaggerClientSecret": "1q2w3e*"
"MetadataAddress": "http://localhost:8080/realms/master",
"SwaggerClientId": "WebGateway_Swagger"
},
"Logging": {
"LogLevel": {

19
services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs

@ -33,16 +33,14 @@ public class IdentityServiceHttpApiHostModule : AbpModule
JwtBearerConfigurationHelper.Configure(context, "IdentityService");
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{ "IdentityService", "Identity Service API" }
},
apiTitle: "IdentityService API"
);
authority: configuration["AuthServer:Authority"]!,
scopes: ["IdentityService"],
flows: ["authorization_code"],
discoveryEndpoint: configuration["AuthServer:MetadataAddress"],
apiTitle: "Identity Service API"
);
context.Services.AddCors(options =>
{
@ -50,7 +48,7 @@ public class IdentityServiceHttpApiHostModule : AbpModule
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
configuration["App:CorsOrigins"]!
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
@ -94,7 +92,6 @@ public class IdentityServiceHttpApiHostModule : AbpModule
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Identity Service API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
});
app.UseAbpSerilogEnrichers();
app.UseAuditing();

4
services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json

@ -6,8 +6,8 @@
"AuthServer": {
"Authority": "http://localhost:8080/realms/master",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "WebGateway_Swagger",
"SwaggerClientSecret": "1q2w3e*"
"MetadataAddress": "http://localhost:8080/realms/master",
"SwaggerClientId": "WebGateway_Swagger"
},
"Keycloak": {
"url": "http://localhost:8080",

17
services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/OrderingServiceHttpApiHostModule.cs

@ -32,16 +32,14 @@ public class OrderingServiceHttpApiHostModule : AbpModule
JwtBearerConfigurationHelper.Configure(context, "OrderingService");
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{ "OrderingService", "Ordering Service API" }
},
authority: configuration["AuthServer:Authority"]!,
scopes: ["OrderingService"],
flows: ["authorization_code"],
discoveryEndpoint: configuration["AuthServer:MetadataAddress"],
apiTitle: "Ordering Service API"
);
);
context.Services.AddCors(options =>
{
@ -49,7 +47,7 @@ public class OrderingServiceHttpApiHostModule : AbpModule
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
configuration["App:CorsOrigins"]!
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
@ -97,7 +95,6 @@ public class OrderingServiceHttpApiHostModule : AbpModule
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Ordering Service API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
});
app.UseAbpSerilogEnrichers();
app.UseAuditing();

4
services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json

@ -6,8 +6,8 @@
"AuthServer": {
"Authority": "http://localhost:8080/realms/master",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "WebGateway_Swagger",
"SwaggerClientSecret": "1q2w3e*"
"MetadataAddress": "http://localhost:8080/realms/master",
"SwaggerClientId": "WebGateway_Swagger"
},
"Logging": {
"LogLevel": {

2
services/payment/src/EShopOnAbp.PaymentService.Domain/EShopOnAbp.PaymentService.Domain.csproj

@ -3,7 +3,7 @@
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<RootNamespace>EShopOnAbp.PaymentService</RootNamespace>
</PropertyGroup>

17
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/PaymentServiceHttpApiHostModule.cs

@ -33,16 +33,14 @@ public class PaymentServiceHttpApiHostModule : AbpModule
JwtBearerConfigurationHelper.Configure(context, "PaymentService");
SwaggerConfigurationHelper.ConfigureWithAuth(
SwaggerConfigurationHelper.ConfigureWithOidc(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{"PaymentService", "Payment Service API"}
},
authority: configuration["AuthServer:Authority"]!,
scopes: ["PaymentService"],
flows: ["authorization_code"],
discoveryEndpoint: configuration["AuthServer:MetadataAddress"],
apiTitle: "Payment Service API"
);
);
context.Services.AddCors(options =>
{
@ -50,7 +48,7 @@ public class PaymentServiceHttpApiHostModule : AbpModule
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
configuration["App:CorsOrigins"]!
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
@ -88,7 +86,6 @@ public class PaymentServiceHttpApiHostModule : AbpModule
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Payment Service API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
});
app.UseAbpSerilogEnrichers();
app.UseAuditing();

4
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json

@ -6,8 +6,8 @@
"AuthServer": {
"Authority": "http://localhost:8080/realms/master",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "WebGateway_Swagger",
"SwaggerClientSecret": "1q2w3e*"
"MetadataAddress": "http://localhost:8080/realms/master",
"SwaggerClientId": "WebGateway_Swagger"
},
"Logging": {
"LogLevel": {

1
shared/EShopOnAbp.Keycloak.DbMigrator/EShopOnAbp.Keycloak.DbMigrator.csproj

@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>EShopOnAbp.DbMigrator</RootNamespace>
</PropertyGroup>

1
shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbp.Shared.Hosting.AspNetCore.csproj

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>EShopOnAbp.Shared.Hosting.AspNetCore</RootNamespace>
</PropertyGroup>

15
shared/EShopOnAbp.Shared.Hosting.AspNetCore/SerilogConfigurationHelper.cs

@ -7,13 +7,6 @@ public static class SerilogConfigurationHelper
{
public static void Configure(string applicationName)
{
// TODO: Uncomment following lines for ElasticSearch configuration
// var configuration = new ConfigurationBuilder()
// .SetBasePath(Directory.GetCurrentDirectory())
// .AddJsonFile("appsettings.json")
// .AddEnvironmentVariables()
// .Build();
Log.Logger = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()
@ -25,14 +18,6 @@ public static class SerilogConfigurationHelper
.Enrich.FromLogContext()
.Enrich.WithProperty("Application", $"{applicationName}")
.WriteTo.Async(c => c.File("Logs/logs.txt"))
// TODO: Uncomment following lines for ElasticSearch configuration
// .WriteTo.Elasticsearch(
// new ElasticsearchSinkOptions(new Uri(configuration["ElasticSearch:Url"]))
// {
// AutoRegisterTemplate = true,
// AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv6,
// IndexFormat = "MyProjectName-log-{0:yyyy.MM}"
// })
.WriteTo.Async(c => c.Console())
.CreateLogger();
}

15
shared/EShopOnAbp.Shared.Hosting.AspNetCore/SwaggerConfigurationHelper.cs

@ -1,5 +1,4 @@
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
using Volo.Abp.Modularity;
@ -19,18 +18,22 @@ public static class SwaggerConfigurationHelper
options.CustomSchemaIds(type => type.FullName);
});
}
public static void ConfigureWithAuth(
public static void ConfigureWithOidc(
ServiceConfigurationContext context,
string authority,
Dictionary<string, string> scopes,
string[] scopes,
string apiTitle,
string apiVersion = "v1",
string apiName = "v1"
string apiName = "v1",
string[]? flows = null,
string? discoveryEndpoint = null
)
{
context.Services.AddAbpSwaggerGenWithOAuth(
context.Services.AddAbpSwaggerGenWithOidc(
authority: authority,
scopes: scopes,
flows: flows,
discoveryEndpoint: discoveryEndpoint,
options =>
{
options.SwaggerDoc(apiName, new OpenApiInfo { Title = apiTitle, Version = apiVersion });

2
shared/EShopOnAbp.Shared.Hosting.Gateways/EShopOnAbp.Shared.Hosting.Gateways.csproj

@ -2,6 +2,8 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>EShopOnAbp.Shared.Hosting.Gateways</RootNamespace>
</PropertyGroup>
<ItemGroup>

1
shared/EShopOnAbp.Shared.Hosting.Gateways/YarpSwaggerUIBuilderExtensions.cs

@ -43,7 +43,6 @@ public static class YarpSwaggerUIBuilderExtensions
options.SwaggerEndpoint($"{clusterGroup.Value.Address}/swagger/v1/swagger.json", $"{routeConfig.RouteId} API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
}
});

2
shared/EShopOnAbp.Shared.Hosting.Microservices/EShopOnAbp.Shared.Hosting.Microservices.csproj

@ -2,6 +2,8 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>EShopOnAbp.Shared.Hosting.Microservices</RootNamespace>
</PropertyGroup>
<ItemGroup>

15
shared/EShopOnAbp.Shared.Hosting.Microservices/EShopOnAbpSharedHostingMicroservicesModule.cs

@ -6,6 +6,7 @@ using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.DependencyInjection;
using StackExchange.Redis;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims;
using Volo.Abp.BackgroundJobs.RabbitMQ;
using Volo.Abp.Caching;
using Volo.Abp.Caching.StackExchangeRedis;
@ -26,6 +27,14 @@ namespace EShopOnAbp.Shared.Hosting.Microservices;
)]
public class EShopOnAbpSharedHostingMicroservicesModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<WebRemoteDynamicClaimsPrincipalContributorOptions>(options =>
{
options.IsEnabled = true;
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true;
@ -36,15 +45,17 @@ public class EShopOnAbpSharedHostingMicroservicesModule : AbpModule
options.KeyPrefix = "EShopOnAbp:";
});
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]!);
context.Services
.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "EShopOnAbp-Protection-Keys");
context.Services.AddSingleton<IDistributedLockProvider>(sp =>
{
var connection = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
var connection = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]!);
return new RedisDistributedSynchronizationProvider(connection.GetDatabase());
});
context.Services.AddHttpClient();
}
}

3
shared/EShopOnAbp.Shared.Hosting/EShopOnAbp.Shared.Hosting.csproj

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>EShopOnAbp.Shared.Hosting</RootNamespace>
</PropertyGroup>

1
shared/EShopOnAbp.Shared.Hosting/EShopOnAbpSharedHostingModule.cs

@ -23,7 +23,6 @@ namespace EShopOnAbp.Shared.Hosting
database.MappedConnections.Add("AbpAuditLogging");
database.MappedConnections.Add("AbpPermissionManagement");
database.MappedConnections.Add("AbpSettingManagement");
database.MappedConnections.Add("AbpFeatureManagement");
database.MappedConnections.Add("AbpBlobStoring");
});

1
shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.csproj

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
<RootNamespace>EShopOnAbp</RootNamespace>
</PropertyGroup>

Loading…
Cancel
Save