Browse Source

feat: Optimize microservice configuration

pull/1470/head
colin 4 months ago
parent
commit
a16dd3b6ab
  1. 2
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchMappers.cs
  2. 1
      aspnet-core/framework/open-api/LINGYUN.Abp.OpenApi.IdentityServer/LINGYUN.Abp.OpenApi.IdentityServer.csproj
  3. 63
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs
  4. 10
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Seeder.cs
  5. 35
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.Development.json
  6. 5
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.json
  7. 44
      aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs
  8. 4
      aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj
  9. 2
      aspnet-core/services/LY.MicroService.AuthServer/Properties/launchSettings.json
  10. 75
      aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json
  11. 6
      aspnet-core/services/LY.MicroService.AuthServer/package.json
  12. 9
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/css/global-styles.css
  13. 13308
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css
  14. 2512
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css
  15. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf
  16. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2
  17. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf
  18. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2
  19. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf
  20. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2
  21. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.ttf
  22. BIN
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2
  23. 6
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js
  24. 1
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js.map
  25. 11
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js
  26. 109
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css
  27. 4
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net/js/dataTables.min.js
  28. 22
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-form/jquery.form.min.js
  29. 27
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/abp.jquery.validate.js
  30. 777
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.all.js
  31. 6
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js
  32. 24
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.css
  33. 777
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.all.js
  34. 6
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.all.min.js
  35. 775
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.js
  36. 4
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.min.js
  37. 775
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.js
  38. 2
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.min.css
  39. 4
      aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.min.js
  40. 29
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.Configure.cs
  41. 1
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs
  42. 2
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Properties/launchSettings.json
  43. 30
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.Development.json
  44. 5
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.json
  45. 3
      aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs
  46. 29
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs
  47. 2
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Properties/launchSettings.json
  48. 30
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.Development.json
  49. 5
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.json
  50. 28
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs
  51. 2
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Properties/launchSettings.json
  52. 38
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.Development.json
  53. 3
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.json
  54. 2
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Properties/launchSettings.json
  55. 30
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs
  56. 40
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.Development.json
  57. 5
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.json
  58. 2
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Properties/launchSettings.json
  59. 36
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs
  60. 48
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.Development.json
  61. 5
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.json
  62. 2
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Properties/launchSettings.json
  63. 4
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/TenantHeaderParamter.cs
  64. 56
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs
  65. 15
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.DataSeeder.cs
  66. 1
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs
  67. 38
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.Development.json
  68. 3
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.json
  69. 2
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/Properties/launchSettings.json
  70. 4
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/TenantHeaderParamter.cs
  71. 59
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.Configure.cs
  72. 37
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.Development.json
  73. 3
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.json
  74. 2
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Properties/launchSettings.json
  75. 35
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs
  76. 15
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.DataSeeder.cs
  77. 48
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json
  78. 3
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.json
  79. 76
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/InternalGatewayModule.cs
  80. 1
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/LINGYUN.MicroService.Internal.Gateway.csproj
  81. 23
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/appsettings.Development.json
  82. 248
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/yarp.json
  83. 19
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.OpenApi.Gateway/OpenApiGatewayModule.cs
  84. 22
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.OpenApi.Gateway/appsettings.Development.json

2
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchMappers.cs

@ -42,9 +42,11 @@ public partial class SerilogInfoToLogInfoMapper : MapperBase<SerilogInfo, LogInf
_logExceptionMapper = logExceptionMapper;
}
[MapperIgnoreTarget(nameof(LogInfo.Fields))]
[MapPropertyFromSource(nameof(SerilogInfo.Level), Use = nameof(GetLogLevel))]
public override partial LogInfo Map(SerilogInfo source);
[MapperIgnoreTarget(nameof(LogInfo.Fields))]
[MapPropertyFromSource(nameof(SerilogInfo.Level), Use = nameof(GetLogLevel))]
public override partial void Map(SerilogInfo source, LogInfo destination);

1
aspnet-core/framework/open-api/LINGYUN.Abp.OpenApi.IdentityServer/LINGYUN.Abp.OpenApi.IdentityServer.csproj

@ -16,6 +16,7 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.IdentityServer.Domain" />
<PackageReference Include="Newtonsoft.Json" VersionOverride="13.0.4" />
</ItemGroup>
<ItemGroup>

63
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs

@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Routing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@ -31,11 +32,11 @@ using System.Text.Encodings.Web;
using System.Text.Unicode;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.BlobStoring;
using Volo.Abp.Caching;
using Volo.Abp.Data;
using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement;
@ -56,7 +57,7 @@ namespace LY.MicroService.AuthServer;
public partial class AuthServerHttpApiHostModule
{
public static string ApplicationName { get; set; } = "AuthService";
public static string ApplicationName { get; set; } = "IdentityService";
private readonly static OneTimeRunner OneTimeRunner = new OneTimeRunner();
@ -131,39 +132,9 @@ public partial class AuthServerHttpApiHostModule
mysql =>
{
// see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960
mysql.TranslateParameterizedCollectionsToConstants();
mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
});
});
Configure<AbpDbConnectionOptions>(options =>
{
options.Databases.Configure("Platform", database =>
{
database.MapConnection("AbpSaas");
database.MapConnection("Workflow");
database.MapConnection("AppPlatform");
database.MapConnection("TaskManagement");
database.MapConnection("AbpAuditLogging");
database.MapConnection("AbpTextTemplating");
database.MapConnection("AbpSettingManagement");
database.MapConnection("AbpFeatureManagement");
database.MapConnection("AbpPermissionManagement");
database.MapConnection("AbpLocalizationManagement");
database.MapConnection("AbpDataProtectionManagement");
});
options.Databases.Configure("Identity", database =>
{
database.MapConnection("AbpGdpr");
database.MapConnection("AbpIdentity");
database.MapConnection("AbpOpenIddict");
database.MapConnection("AbpIdentityServer");
});
options.Databases.Configure("Realtime", database =>
{
database.MapConnection("Notifications");
database.MapConnection("MessageService");
});
});
}
private void ConfigureJsonSerializer(IConfiguration configuration)
@ -261,8 +232,11 @@ public partial class AuthServerHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -474,14 +448,19 @@ public partial class AuthServerHttpApiHostModule
}
});
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
configuration.GetSection("AntiForgery").Bind(options);
});
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
private void ConfigureWrapper()

10
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Seeder.cs

@ -1,10 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LY.MicroService.AuthServer;
public partial class AuthServerHttpApiHostModule
{
}

35
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.Development.json

@ -4,28 +4,28 @@
"env": "DEV",
"appId": "LINGYUN.Abp.AuthServer.Admin",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "AuthServer.Admin",
"tag": "AuthServer.Admin",
"configCacheEncrypt": true
},
"App": {
"ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ],
"CorsOrigins": [ "http://localhost:5666" ],
"Urls": {
"Applications": {
"MVC": {
"RootUrl": "http://127.0.0.1:44385/",
"RootUrl": "http://localhost:44385/",
"Urls": {
"Abp.Account.EmailConfirm": "Account/EmailConfirm",
"Abp.Account.EmailVerifyLogin": "Account/VerifyCode"
}
},
"STS": {
"RootUrl": "http://127.0.0.1:44385/"
"RootUrl": "http://localhost:44385/"
},
"VueVbenAdmin": {
"RootUrl": "http://127.0.0.1:3100/",
"RootUrl": "http://localhost:3100/",
"Urls": {
"Abp.Account.EmailConfirm": "account/email-confirm",
"Abp.Account.EmailVerifyLogin": "account/verify-code"
@ -46,10 +46,7 @@
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"CAP": {
"EventBus": {
@ -61,10 +58,10 @@
},
"MySql": {
"TableNamePrefix": "ida",
"ConnectionString": "Server=127.0.0.1;Database=AuthServer-v70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -75,22 +72,23 @@
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13"
"Configuration": "localhost,defaultDatabase=13"
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"RemoteServices": {
"Platform": {
"BaseUrl": "http://127.0.0.1:30025",
"BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false
}
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385",
"Audience": "identity-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client"
@ -101,7 +99,7 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -109,6 +107,7 @@
"Override": {
"System": "Information",
"Microsoft": "Information",
"Microsoft.EntityFrameworkCore": "Warning",
"DotNetCore": "Warning"
}
},
@ -123,7 +122,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.json

@ -5,8 +5,11 @@
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},
"AntiForgery": {
"AutoValidate": false
},
"App": {
"CorsOrigins": "http://localhost:3100"
"CorsOrigins": ["http://localhost:30000"]
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",

44
aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs

@ -39,6 +39,8 @@ using System.Text.Encodings.Web;
using System.Text.Unicode;
using Volo.Abp.Account.Localization;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling;
using Volo.Abp.Auditing;
using Volo.Abp.BlobStoring;
using Volo.Abp.Caching;
@ -179,6 +181,15 @@ public partial class AuthServerModule
});
});
Configure<AbpBundlingOptions>(options =>
{
options.StyleBundles
.Configure(LeptonXLiteThemeBundles.Styles.Global, bundle =>
{
bundle.AddFiles("/css/global-styles.css");
});
});
services.AddHealthChecks();
}
@ -226,8 +237,11 @@ public partial class AuthServerModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -407,19 +421,19 @@ public partial class AuthServerModule
options.TokenValidationParameters.IssuerValidator = TokenWildcardIssuerValidator.IssuerValidator;
}
});
//.AddWeChatWork(options =>
//{
// options.SignInScheme = IdentityConstants.ExternalScheme;
//});
if (!isDevelopment)
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
//.AddWeChatWork(options =>
//{
// options.SignInScheme = IdentityConstants.ExternalScheme;
//});
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
services.AddSameSiteCookiePolicy();
}
private void ConfigureMultiTenancy(IConfiguration configuration)

4
aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj

@ -81,8 +81,4 @@
<ProjectReference Include="..\..\modules\platform\LINGYUN.Abp.Sms.Platform\LINGYUN.Abp.Sms.Platform.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
</Project>

2
aspnet-core/services/LY.MicroService.AuthServer/Properties/launchSettings.json

@ -7,7 +7,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://127.0.0.1:44385;https://127.0.0.1:44386"
"applicationUrl": "http://localhost:44385;https://localhost:44386"
}
}
}

75
aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json

@ -4,38 +4,39 @@
"env": "DEV",
"appId": "LINGYUN.Abp.AuthServer",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:15000",
"nodes": "http://localhost:15000",
"name": "AuthServer",
"tag": "AuthServer",
"configCacheEncrypt": true
},
"App": {
"CorsOrigins": [
"http://127.0.0.1:5666",
"http://127.0.0.1:30010",
"http://127.0.0.1:30015",
"http://127.0.0.1:30020",
"http://127.0.0.1:30025",
"http://127.0.0.1:30030",
"http://127.0.0.1:30040",
"http://127.0.0.1:30045",
"http://127.0.0.1:30050",
"http://127.0.0.1:30060"
"http://localhost:5666",
"http://localhost:30000",
"http://localhost:30010",
"http://localhost:30015",
"http://localhost:30020",
"http://localhost:30025",
"http://localhost:30030",
"http://localhost:30040",
"http://localhost:30045",
"http://localhost:30050",
"http://localhost:30060"
],
"Urls": {
"Applications": {
"MVC": {
"RootUrl": "http://127.0.0.1:44385/",
"RootUrl": "http://localhost:44385/",
"Urls": {
"Abp.Account.EmailConfirm": "Account/EmailConfirm",
"Abp.Account.EmailVerifyLogin": "Account/VerifyCode"
}
},
"STS": {
"RootUrl": "http://127.0.0.1:44385/"
"RootUrl": "http://localhost:44385/"
},
"VueVbenAdmin": {
"RootUrl": "http://127.0.0.1:5666/",
"RootUrl": "http://localhost:5666/",
"Urls": {
"Abp.Account.EmailConfirm": "account/email-confirm",
"Abp.Account.EmailVerifyLogin": "account/verify-code"
@ -56,10 +57,7 @@
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"CAP": {
"EventBus": {
@ -71,10 +69,10 @@
},
"MySql": {
"TableNamePrefix": "auth",
"ConnectionString": "Server=127.0.0.1;Database=AuthServer-v70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -85,22 +83,23 @@
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13"
"Configuration": "localhost,defaultDatabase=13"
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"RemoteServices": {
"Platform": {
"BaseUrl": "http://127.0.0.1:30025",
"BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false
}
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385/",
"Audience": "auth-server",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false
},
@ -109,7 +108,7 @@
"VueAdmin": {
"ClientId": "vue-admin-client",
"ClientSecret": "1q2w3e*",
"RootUrl": "http://127.0.0.1:5666/"
"RootUrl": "http://localhost:5666/"
},
"InternalService": {
"ClientId": "InternalServiceClient",
@ -118,16 +117,16 @@
"VueOAuthClient": {
"ClientId": "vue-oauth-client",
"RootUrls": [
"http://127.0.0.1:5666",
"http://127.0.0.1:30010",
"http://127.0.0.1:30015",
"http://127.0.0.1:30020",
"http://127.0.0.1:30025",
"http://127.0.0.1:30030",
"http://127.0.0.1:30040",
"http://127.0.0.1:30045",
"http://127.0.0.1:30050",
"http://127.0.0.1:30060"
"http://localhost:5666",
"http://localhost:30010",
"http://localhost:30015",
"http://localhost:30020",
"http://localhost:30025",
"http://localhost:30030",
"http://localhost:30040",
"http://localhost:30045",
"http://localhost:30050",
"http://localhost:30060"
]
}
}
@ -157,7 +156,7 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -179,7 +178,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

6
aspnet-core/services/LY.MicroService.AuthServer/package.json

@ -1,9 +1,9 @@
{
"version": "9.3.5",
"version": "10.2.0",
"name": "my-app-authserver",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "4.3.5",
"@abp/qrcode": "9.3.5"
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "5.2.0",
"@abp/qrcode": "10.2.0"
}
}

9
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/css/global-styles.css

@ -0,0 +1,9 @@
.account-module-form {
padding: 24px;
border: 0;
background: #fff;
color: #000;
box-shadow: 0 0 30px rgba(8, 20, 73, .1);
border-radius: 4px;
margin-top: 0.75rem !important;
}

13308
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css

File diff suppressed because it is too large

2512
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css

File diff suppressed because it is too large

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.ttf

Binary file not shown.

BIN
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2

Binary file not shown.

6
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js

File diff suppressed because one or more lines are too long

1
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js.map

File diff suppressed because one or more lines are too long

11
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js

@ -340,6 +340,17 @@ var abp = abp || {};
callback && callback(result);
};
abp.message.prompt = function (message, titleOrOptionsOrCallback, callback) {
abp.log.warn('abp.message.prompt is not properly implemented!');
if (titleOrOptionsOrCallback && !(typeof titleOrOptionsOrCallback == 'string')) {
callback = titleOrOptionsOrCallback;
}
var result = prompt(message);
callback && callback(result);
};
/* UI *******************************************************/
abp.ui = abp.ui || {};

109
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css

@ -76,42 +76,42 @@ table.dataTable thead > tr > th:active,
table.dataTable thead > tr > td:active {
outline: none;
}
table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before {
table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before {
position: absolute;
display: block;
bottom: 50%;
content: "\25B2";
content: "\25B2"/"";
}
table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after,
table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after {
table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:after {
position: absolute;
display: block;
top: 50%;
content: "\25BC";
content: "\25BC"/"";
}
table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order, table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order,
table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order,
table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order {
table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order,
table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order,
table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order,
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order,
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order {
position: relative;
width: 12px;
height: 24px;
}
table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order:after, table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after,
table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order:after,
table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after {
height: 20px;
}
table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order:after, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order:after,
table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:after {
left: 0;
opacity: 0.125;
line-height: 9px;
@ -128,15 +128,15 @@ table.dataTable thead > tr > td.dt-orderable-desc:hover {
outline: 2px solid rgba(0, 0, 0, 0.05);
outline-offset: -2px;
}
table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after {
table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:after {
opacity: 0.6;
}
table.dataTable thead > tr > th.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) span.dt-column-order:empty, table.dataTable thead > tr > th.sorting_desc_disabled span.dt-column-order:after, table.dataTable thead > tr > th.sorting_asc_disabled span.dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) span.dt-column-order:empty,
table.dataTable thead > tr > td.sorting_desc_disabled span.dt-column-order:after,
table.dataTable thead > tr > td.sorting_asc_disabled span.dt-column-order:before {
table.dataTable thead > tr > th.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) .dt-column-order:empty, table.dataTable thead > tr > th.sorting_desc_disabled .dt-column-order:after, table.dataTable thead > tr > th.sorting_asc_disabled .dt-column-order:before,
table.dataTable thead > tr > td.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) .dt-column-order:empty,
table.dataTable thead > tr > td.sorting_desc_disabled .dt-column-order:after,
table.dataTable thead > tr > td.sorting_asc_disabled .dt-column-order:before {
display: none;
}
table.dataTable thead > tr > th:active,
@ -157,24 +157,24 @@ table.dataTable tfoot > tr > td div.dt-column-footer {
align-items: var(--dt-header-align-items);
gap: 4px;
}
table.dataTable thead > tr > th div.dt-column-header span.dt-column-title,
table.dataTable thead > tr > th div.dt-column-footer span.dt-column-title,
table.dataTable thead > tr > td div.dt-column-header span.dt-column-title,
table.dataTable thead > tr > td div.dt-column-footer span.dt-column-title,
table.dataTable tfoot > tr > th div.dt-column-header span.dt-column-title,
table.dataTable tfoot > tr > th div.dt-column-footer span.dt-column-title,
table.dataTable tfoot > tr > td div.dt-column-header span.dt-column-title,
table.dataTable tfoot > tr > td div.dt-column-footer span.dt-column-title {
table.dataTable thead > tr > th div.dt-column-header .dt-column-title,
table.dataTable thead > tr > th div.dt-column-footer .dt-column-title,
table.dataTable thead > tr > td div.dt-column-header .dt-column-title,
table.dataTable thead > tr > td div.dt-column-footer .dt-column-title,
table.dataTable tfoot > tr > th div.dt-column-header .dt-column-title,
table.dataTable tfoot > tr > th div.dt-column-footer .dt-column-title,
table.dataTable tfoot > tr > td div.dt-column-header .dt-column-title,
table.dataTable tfoot > tr > td div.dt-column-footer .dt-column-title {
flex-grow: 1;
}
table.dataTable thead > tr > th div.dt-column-header span.dt-column-title:empty,
table.dataTable thead > tr > th div.dt-column-footer span.dt-column-title:empty,
table.dataTable thead > tr > td div.dt-column-header span.dt-column-title:empty,
table.dataTable thead > tr > td div.dt-column-footer span.dt-column-title:empty,
table.dataTable tfoot > tr > th div.dt-column-header span.dt-column-title:empty,
table.dataTable tfoot > tr > th div.dt-column-footer span.dt-column-title:empty,
table.dataTable tfoot > tr > td div.dt-column-header span.dt-column-title:empty,
table.dataTable tfoot > tr > td div.dt-column-footer span.dt-column-title:empty {
table.dataTable thead > tr > th div.dt-column-header .dt-column-title:empty,
table.dataTable thead > tr > th div.dt-column-footer .dt-column-title:empty,
table.dataTable thead > tr > td div.dt-column-header .dt-column-title:empty,
table.dataTable thead > tr > td div.dt-column-footer .dt-column-title:empty,
table.dataTable tfoot > tr > th div.dt-column-header .dt-column-title:empty,
table.dataTable tfoot > tr > th div.dt-column-footer .dt-column-title:empty,
table.dataTable tfoot > tr > td div.dt-column-header .dt-column-title:empty,
table.dataTable tfoot > tr > td div.dt-column-footer .dt-column-title:empty {
display: none;
}
@ -576,16 +576,16 @@ table.dataTable.table-sm > thead > tr td.dt-ordering-asc,
table.dataTable.table-sm > thead > tr td.dt-ordering-desc {
padding-right: 0.25rem;
}
table.dataTable.table-sm > thead > tr th.dt-orderable-asc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-orderable-desc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-asc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-desc span.dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-orderable-asc span.dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-orderable-desc span.dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-ordering-asc span.dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-ordering-desc span.dt-column-order {
table.dataTable.table-sm > thead > tr th.dt-orderable-asc .dt-column-order, table.dataTable.table-sm > thead > tr th.dt-orderable-desc .dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-asc .dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-desc .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-orderable-asc .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-orderable-desc .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-ordering-asc .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-ordering-desc .dt-column-order {
right: 0.25rem;
}
table.dataTable.table-sm > thead > tr th.dt-type-date span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-type-numeric span.dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-type-date span.dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-type-numeric span.dt-column-order {
table.dataTable.table-sm > thead > tr th.dt-type-date .dt-column-order, table.dataTable.table-sm > thead > tr th.dt-type-numeric .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-type-date .dt-column-order,
table.dataTable.table-sm > thead > tr td.dt-type-numeric .dt-column-order {
left: 0.25rem;
}
@ -594,7 +594,8 @@ div.dt-scroll-head table.table-bordered {
}
div.table-responsive > div.dt-container > div.row {
margin: 0;
margin-left: 0;
margin-right: 0;
}
div.table-responsive > div.dt-container > div.row > div[class^=col-]:first-child {
padding-left: 0;

4
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net/js/dataTables.min.js

File diff suppressed because one or more lines are too long

22
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-form/jquery.form.min.js

File diff suppressed because one or more lines are too long

27
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/abp.jquery.validate.js

@ -0,0 +1,27 @@
$.validator.methods.range = function (value, element, param) {
if (this.optional(element)) {
return true;
}
// Remove thousands separators and convert decimal separators
var cleanValue = value.replace(/[.,](?=.*[.,])/g, '').replace(/[.,](?!.*[.,])/g, '.');
var numericValue = parseFloat(cleanValue);
// Check if conversion was successful and value is within range
return !isNaN(numericValue) && (numericValue >= param[0] && numericValue <= param[1]);
};
$.validator.methods.number = function (value, element) {
if (this.optional(element)) {
return true;
}
// 1. Period as decimal separator, comma as thousands separator (e.g., 1,234.56 or -1,234.56)
// 2. Comma as decimal separator, period as thousands separator (e.g., 1.234,56 or -1.234,56)
// 3. Pure numbers (integers)
var pattern1 = /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:-?\.\d+)?$/;
var pattern2 = /^(?:-?\d+|-?\d{1,3}(?:\.\d{3})+)?(?:-?,\d+)?$/;
var pattern3 = /^-?\d+$/;
return pattern1.test(value) || pattern2.test(value) || pattern3.test(value);
}

777
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.all.js

File diff suppressed because one or more lines are too long

6
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js

File diff suppressed because one or more lines are too long

24
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.css

@ -2,7 +2,7 @@
--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);
--swal2-container-padding: 0.625em;
--swal2-backdrop: rgba(0, 0, 0, 0.4);
--swal2-backdrop-transition: background-color 0.1s;
--swal2-backdrop-transition: background-color 0.15s;
--swal2-width: 32em;
--swal2-padding: 0 0 1.25em;
--swal2-border: none;
@ -22,7 +22,7 @@
--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;
--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;
--swal2-input-focus-border: 1px solid #b4dbed;
--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px $swal2-outline-color;
--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);
--swal2-progress-step-background: #add8e6;
--swal2-validation-message-background: #f0f0f0;
--swal2-validation-message-color: #666;
@ -112,7 +112,7 @@ body.swal2-no-backdrop .swal2-container {
pointer-events: none;
}
body.swal2-no-backdrop .swal2-container .swal2-popup {
pointer-events: all;
pointer-events: auto;
}
body.swal2-no-backdrop .swal2-container .swal2-modal {
box-shadow: 0 0 10px var(--swal2-backdrop);
@ -855,7 +855,7 @@ div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long] {
border: var(--swal2-toast-border);
background: var(--swal2-background);
box-shadow: var(--swal2-toast-box-shadow);
pointer-events: all;
pointer-events: auto;
}
.swal2-toast > * {
grid-column: 2;
@ -1012,25 +1012,21 @@ div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long] {
@keyframes swal2-show {
0% {
transform: scale(0.7);
}
45% {
transform: scale(1.05);
}
80% {
transform: scale(0.95);
transform: translate3d(0, -50px, 0) scale(0.9);
opacity: 0;
}
100% {
transform: scale(1);
transform: translate3d(0, 0, 0) scale(1);
opacity: 1;
}
}
@keyframes swal2-hide {
0% {
transform: scale(1);
transform: translate3d(0, 0, 0) scale(1);
opacity: 1;
}
100% {
transform: scale(0.5);
transform: translate3d(0, -50px, 0) scale(0.9);
opacity: 0;
}
}

777
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.all.js

File diff suppressed because one or more lines are too long

6
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.all.min.js

File diff suppressed because one or more lines are too long

775
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.js

File diff suppressed because it is too large

4
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.esm.min.js

File diff suppressed because one or more lines are too long

775
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.js

File diff suppressed because it is too large

2
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.min.css

File diff suppressed because one or more lines are too long

4
aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/sweetalert2/sweetalert2.min.js

File diff suppressed because one or more lines are too long

29
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.Configure.cs

@ -31,6 +31,7 @@ using System.Text.Encodings.Web;
using System.Text.Unicode;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Caching;
@ -55,7 +56,7 @@ namespace LY.MicroService.BackendAdmin;
public partial class BackendAdminHttpApiHostModule
{
public static string ApplicationName { get; set; } = "BackendAdminService";
public static string ApplicationName { get; set; } = "AdminService";
protected const string DefaultCorsPolicyName = "Default";
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
@ -238,8 +239,11 @@ public partial class BackendAdminHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -449,14 +453,19 @@ public partial class BackendAdminHttpApiHostModule
}
});
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
configuration.GetSection("AntiForgery").Bind(options);
});
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
private void ConfigureWrapper()

1
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs

@ -165,7 +165,6 @@ public partial class BackendAdminHttpApiHostModule : AbpModule
ConfigureCors(context.Services, configuration);
ConfigureSwagger(context.Services, configuration);
ConfigureDistributedLocking(context.Services, configuration);
ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment());
ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment());
}

2
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30010",
"applicationUrl": "http://localhost:30010",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

30
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.Development.json

@ -4,15 +4,15 @@
"env": "DEV",
"appId": "LINGYUN.Abp.Backend.Admin",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "BackendAdmin",
"tag": "BackendAdmin",
"configCacheEncrypt": true
},
"App": {
"ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ],
"RefreshClaimsUrl": "http://127.0.0.1:30015"
"CorsOrigins": [ "http://localhost:5666" ],
"RefreshClaimsUrl": "http://localhost:30015"
},
"Auditing": {
"AllEntitiesSelector": true
@ -26,10 +26,7 @@
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"CAP": {
"EventBus": {
@ -41,10 +38,10 @@
},
"MySql": {
"TableNamePrefix": "admin",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -55,23 +52,24 @@
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13"
"Configuration": "localhost,defaultDatabase=13"
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385/",
"Audience": "admin-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client"
},
"RemoteServices": {
"Platform": {
"BaseUrl": "http://127.0.0.1:30025",
"BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false
}
},
@ -88,7 +86,7 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -110,7 +108,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.json

@ -1,10 +1,13 @@
{
"App": {
"CorsOrigins": "http://localhost:3100"
"CorsOrigins": ["http://localhost:30000"]
},
"Clock": {
"Kind": "Local"
},
"AntiForgery": {
"AutoValidate": false
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84",

3
aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs

@ -15,6 +15,7 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Routing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@ -122,7 +123,7 @@ public partial class IdentityServerHttpApiHostModule
mysql =>
{
// see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960
mysql.TranslateParameterizedCollectionsToConstants();
mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
});
});

29
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs

@ -28,6 +28,7 @@ using System.Text.Encodings.Web;
using System.Text.Unicode;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.Caching;
using Volo.Abp.FeatureManagement;
@ -164,8 +165,11 @@ public partial class LocalizationManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -355,19 +359,18 @@ public partial class LocalizationManagementHttpApiHostModule
}
});
if (isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{
// services.AddAlwaysAllowAuthorization();
}
configuration.GetSection("AntiForgery").Bind(options);
});
if (!isDevelopment)
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
private void ConfigureWrapper()

2
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30030",
"applicationUrl": "http://localhost:30030",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

30
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.Development.json

@ -4,15 +4,15 @@
"env": "DEV",
"appId": "LINGYUN.Abp.Localization",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "Localization",
"tag": "Localization",
"configCacheEncrypt": true
},
"App": {
"CorsOrigins": [ "http://127.0.0.1:5666" ],
"CorsOrigins": [ "http://localhost:5666" ],
"ShowPii": true,
"RefreshClaimsUrl": "http://127.0.0.1:30015"
"RefreshClaimsUrl": "http://localhost:30015"
},
"Auditing": {
"AllEntitiesSelector": true
@ -26,10 +26,7 @@
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"CAP": {
"EventBus": {
@ -41,10 +38,10 @@
},
"MySql": {
"TableNamePrefix": "lta",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -55,22 +52,23 @@
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13"
"Configuration": "localhost,defaultDatabase=13"
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"RemoteServices": {
"Platform": {
"BaseUrl": "http://127.0.0.1:30025",
"BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false
}
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385/",
"Audience": "localization-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client"
@ -81,7 +79,7 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -103,7 +101,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.json

@ -5,8 +5,11 @@
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},
"AntiForgery": {
"AutoValidate": false
},
"App": {
"CorsOrigins": "http://localhost:3100"
"CorsOrigins": ["http://localhost:30000"]
},
"AllowedHosts": "*",
"StringEncryption": {

28
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs

@ -33,6 +33,7 @@ using System.Text.Unicode;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.BlobStoring;
using Volo.Abp.Caching;
@ -190,8 +191,11 @@ public partial class PlatformManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -409,16 +413,18 @@ public partial class PlatformManagementHttpApiHostModule
};
});
// services.AddAlwaysAllowAuthorization();
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
configuration.GetSection("AntiForgery").Bind(options);
});
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
private void ConfigureWrapper()

2
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30025",
"applicationUrl": "http://localhost:30025",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

38
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.Development.json

@ -4,7 +4,7 @@
"env": "DEV",
"appId": "LINGYUN.Abp.Platform",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "Platform",
"tag": "Platform",
"configCacheEncrypt": true
@ -14,12 +14,12 @@
"Forwarded": {
"ForwardedHeaders": 5,
"KnownProxies": [
"127.0.0.1"
"localhost"
]
},
"CorsOrigins": [ "http://127.0.0.1:5666" ],
"CorsOrigins": [ "http://localhost:5666" ],
"ShowPii": true,
"RefreshClaimsUrl": "http://127.0.0.1:30015"
"RefreshClaimsUrl": "http://localhost:30015"
},
"Auditing": {
"AllEntitiesSelector": true
@ -34,13 +34,13 @@
},
"RemoteServices": {
"AbpIdentity": {
"BaseUrl": "http://127.0.0.1:30015/",
"BaseUrl": "http://localhost:30015/",
"IdentityClient": "InternalServiceClient"
}
},
"IdentityClients": {
"InternalServiceClient": {
"Authority": "http://127.0.0.1:44385/",
"Authority": "http://localhost:44385/",
"RequireHttps": false,
"GrantType": "client_credentials",
"Scope": "lingyun-abp-application",
@ -49,15 +49,12 @@
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"Features": {
"Validation": {
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=8",
"Configuration": "localhost,defaultDatabase=8",
"InstanceName": "LINGYUN.Abp.Application"
}
}
@ -72,10 +69,10 @@
},
"MySql": {
"TableNamePrefix": "plt",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -86,16 +83,17 @@
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13"
"Configuration": "localhost,defaultDatabase=13"
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385/",
"Audience": "platform-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client"
@ -106,9 +104,9 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"OssManagement": {
"BlobManagement": {
"Provider": "FileSystem",
"FileSystem": {
"Bucket": "blobs",
@ -135,7 +133,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

3
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.json

@ -5,6 +5,9 @@
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},
"AntiForgery": {
"AutoValidate": false
},
"AllowedHosts": "*",
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",

2
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30020",
"applicationUrl": "http://localhost:30020",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

30
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs

@ -35,6 +35,7 @@ using System.Text.Unicode;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.Caching;
using Volo.Abp.FeatureManagement;
@ -226,8 +227,11 @@ public partial class RealtimeMessageHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -474,19 +478,19 @@ public partial class RealtimeMessageHttpApiHostModule
};
});
if (isDevelopment)
{
// services.AddAlwaysAllowAuthorization();
}
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
configuration.GetSection("AntiForgery").Bind(options);
});
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
private void ConfigureWrapper()
{

40
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.Development.json

@ -4,21 +4,21 @@
"env": "DEV",
"appId": "LINGYUN.Abp.Message",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "Message",
"tag": "Message",
"configCacheEncrypt": true
},
"App": {
"CorsOrigins": [ "http://127.0.0.1:5666" ],
"CorsOrigins": [ "http://localhost:5666" ],
"Forwarded": {
"ForwardedHeaders": 5,
"KnownProxies": [
"127.0.0.1"
"localhost"
]
},
"ShowPii": true,
"RefreshClaimsUrl": "http://127.0.0.1:30015"
"RefreshClaimsUrl": "http://localhost:30015"
},
"Auditing": {
"AllEntitiesSelector": true
@ -38,45 +38,43 @@
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13"
"Configuration": "localhost,defaultDatabase=13"
}
},
"Features": {
"Validation": {
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=8",
"Configuration": "localhost,defaultDatabase=8",
"InstanceName": "LINGYUN.Abp.Application"
}
}
},
"Redis": {
"IsEnabled": true,
"Configuration": "127.0.0.1,defaultDatabase=8",
"Configuration": "localhost,defaultDatabase=8",
"InstanceName": "LINGYUN.Abp.Application"
},
"RemoteServices": {
"Platform": {
"BaseUrl": "http://127.0.0.1:30025",
"BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false
}
},
"SignalR": {
"Redis": {
"IsEnabled": true,
"Configuration": "127.0.0.1,defaultDatabase=13,channelPrefix=abp-realtime-channel"
"Configuration": "localhost,defaultDatabase=13,channelPrefix=abp-realtime-channel"
}
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385/",
"Audience": "message-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client"
@ -87,8 +85,8 @@
"quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz",
"quartz.dataSource.tkm.connectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement",
"quartz.dataSource.tkm.connectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "Default",
"quartz.dataSource.tkm.provider": "MySqlConnector",
"quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json",
@ -113,10 +111,10 @@
},
"MySql": {
"TableNamePrefix": "msg",
"ConnectionString": "Server=127.0.0.1;Database=Messages-v70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -130,7 +128,7 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -155,7 +153,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.json

@ -5,8 +5,11 @@
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},
"AntiForgery": {
"AutoValidate": false
},
"App": {
"CorsOrigins": "http://localhost:3100"
"CorsOrigins": ["http://localhost:30000"]
},
"AllowedHosts": "*",
"StringEncryption": {

2
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Properties/launchSettings.json

@ -12,7 +12,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30040",
"applicationUrl": "http://localhost:30040",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

36
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs

@ -1,6 +1,5 @@
using DotNetCore.CAP;
using LINGYUN.Abp.BackgroundTasks;
using LINGYUN.Abp.BlobStoring.BlobManagement;
using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Localization.CultureMap;
@ -31,6 +30,7 @@ using System.Text.Encodings.Web;
using System.Text.Unicode;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.BlobStoring;
using Volo.Abp.Caching;
@ -153,8 +153,11 @@ public partial class TaskManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -294,15 +297,6 @@ public partial class TaskManagementHttpApiHostModule
{
Configure<AbpBlobStoringOptions>(options =>
{
// all container use oss management
options.Containers.ConfigureAll((containerName, containerConfiguration) =>
{
// use oss management
containerConfiguration.UseBlobManagement(config =>
{
config.ContainerName = configuration[BlobManagementBlobProviderConfigurationNames.ContainerName] ?? "tasks";
});
});
});
}
@ -426,14 +420,18 @@ public partial class TaskManagementHttpApiHostModule
}
});
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
configuration.GetSection("AntiForgery").Bind(options);
});
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
private void ConfigureWrapper()

48
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.Development.json

@ -4,15 +4,15 @@
"env": "DEV",
"appId": "LINGYUN.Abp.TaskManagement",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "LINGYUN.Abp.TaskManagement",
"tag": "LINGYUN.Abp.TaskManagement",
"configCacheEncrypt": true
},
"App": {
"ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ],
"RefreshClaimsUrl": "http://127.0.0.1:30015"
"CorsOrigins": [ "http://localhost:5666" ],
"RefreshClaimsUrl": "http://localhost:30015"
},
"Auditing": {
"AllEntitiesSelector": true
@ -35,10 +35,10 @@
},
"MySql": {
"TableNamePrefix": "tsk",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -52,37 +52,30 @@
"quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz",
"quartz.dataSource.tkm.connectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement",
"quartz.dataSource.tkm.connectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "Default",
"quartz.dataSource.tkm.provider": "MySqlConnector",
"quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json"
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpTenantManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpTextTemplating": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RemoteServices": {
"AbpOssManagement": {
"BaseUrl": "http://127.0.0.1:30025",
"BaseUrl": "http://localhost:30025",
"IdentityClient": "InternalServiceClient",
"UseCurrentAccessToken": false
},
"Platform": {
"BaseUrl": "http://127.0.0.1:30025",
"BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false
}
},
"IdentityClients": {
"InternalServiceClient": {
"Authority": "http://127.0.0.1:44385",
"Authority": "http://localhost:44385",
"RequireHttps": false,
"GrantType": "client_credentials",
"Scope": "lingyun-abp-application",
@ -93,19 +86,18 @@
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15"
"Configuration": "localhost,defaultDatabase=15"
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"Scopes": "lingyun-abp-application",
"SwaggerClientId": "InternalServiceClient",
"SwaggerClientSecret": "1q2w3E*",
"Authority": "http://localhost:44385/",
"Audience": "task-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"SwaggerClientId": "vue-oauth-client",
"MapInboundClaims": false,
"RequireHttpsMetadata": false
},
@ -122,13 +114,13 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"OpenTelemetry": {
"IsEnabled": true,
"ZipKin": {
"Endpoint": "http://127.0.0.1:9411/api/v2/spans"
"Endpoint": "http://localhost:9411/api/v2/spans"
}
},
"Serilog": {
@ -152,7 +144,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

5
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.json

@ -1,10 +1,13 @@
{
"App": {
"CorsOrigins": "http://localhost:3100"
"CorsOrigins": ["http://localhost:30000"]
},
"Clock": {
"Kind": "Local"
},
"AntiForgery": {
"AutoValidate": false
},
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},

2
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Properties/launchSettings.json

@ -15,7 +15,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://127.0.0.1:30045"
"applicationUrl": "http://localhost:30045"
}
}
}

4
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/TenantHeaderParamter.cs

@ -1,5 +1,5 @@
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using System.Collections.Generic;
using Volo.Abp.AspNetCore.MultiTenancy;
@ -23,7 +23,7 @@ public class TenantHeaderParamter : IOperationFilter
{
if (_multiTenancyOptions.IsEnabled)
{
operation.Parameters = operation.Parameters ?? new List<OpenApiParameter>();
operation.Parameters = operation.Parameters ?? new List<IOpenApiParameter>();
operation.Parameters.Add(new OpenApiParameter
{
Name = _aspNetCoreMultiTenancyOptions.TenantKey,

56
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs

@ -23,16 +23,18 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.IdentityModel.Logging;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using Quartz;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Encodings.Web;
using System.Text.Unicode;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.Caching;
using Volo.Abp.FeatureManagement;
@ -187,8 +189,11 @@ public partial class WebhooksManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -336,25 +341,16 @@ public partial class WebhooksManagementHttpApiHostModule
});
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{
Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
Name = "Authorization",
In = ParameterLocation.Header,
Scheme = "bearer",
Type = SecuritySchemeType.Http,
BearerFormat = "JWT"
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
options.DescribeAllParametersInCamelCase();
var xmlDocFiles = new List<string>();
xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "LINGYUN.Abp.*.xml"));
xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "Volo.Abp.*.xml"));
foreach (var xmlDocFile in xmlDocFiles)
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" }
},
new string[] { }
}
});
options.IncludeXmlComments(xmlDocFile);
}
options.OperationFilter<TenantHeaderParamter>();
});
}
@ -472,14 +468,18 @@ public partial class WebhooksManagementHttpApiHostModule
}
});
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
configuration.GetSection("AntiForgery").Bind(options);
});
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
private void ConfigureWrapper()

15
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.DataSeeder.cs

@ -1,15 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using LY.MicroService.WebhooksManagement.DataSeeder;
namespace LY.MicroService.WebhooksManagement;
public partial class WebhooksManagementHttpApiHostModule
{
private static void ConfigureSeedWorker(IServiceCollection services, bool isDevelopment = false)
{
if (isDevelopment)
{
services.AddHostedService<WebhooksManagementDataSeederWorker>();
}
}
}

1
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs

@ -130,7 +130,6 @@ public partial class WebhooksManagementHttpApiHostModule : AbpModule
ConfigureSwagger(context.Services, configuration);
ConfigureDistributedLock(context.Services, configuration);
ConfigureBackgroundTasks(context.Services, configuration);
ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment());
ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment());
}

38
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.Development.json

@ -4,15 +4,15 @@
"env": "DEV",
"appId": "LINGYUN.Abp.WebhooksManagement",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "LINGYUN.Abp.WebhooksManagement",
"tag": "LINGYUN.Abp.WebhooksManagement",
"configCacheEncrypt": true
},
"App": {
"ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ],
"RefreshClaimsUrl": "http://127.0.0.1:30015"
"CorsOrigins": [ "http://localhost:5666" ],
"RefreshClaimsUrl": "http://localhost:30015"
},
"Auditing": {
"AllEntitiesSelector": true
@ -26,32 +26,29 @@
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
"Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15"
"Configuration": "localhost,defaultDatabase=15"
}
},
"OpenTelemetry": {
"IsEnabled": true,
"ZipKin": {
"Endpoint": "http://127.0.0.1:9411/api/v2/spans"
"Endpoint": "http://localhost:9411/api/v2/spans"
}
},
"RemoteServices": {
"Platform": {
"BaseUrl": "http://127.0.0.1:30025",
"BaseUrl": "http://localhost:30025",
"UseCurrentAccessToken": false
}
},
"IdentityClients": {
"InternalServiceClient": {
"Authority": "http://127.0.0.1:44385",
"Authority": "http://localhost:44385",
"RequireHttps": false,
"GrantType": "client_credentials",
"Scope": "lingyun-abp-application",
@ -69,10 +66,10 @@
},
"MySql": {
"TableNamePrefix": "wkm",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -86,8 +83,8 @@
"quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz",
"quartz.dataSource.tkm.connectionString": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement",
"quartz.dataSource.tkm.connectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "Default",
"quartz.dataSource.tkm.provider": "MySqlConnector",
"quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json",
@ -96,12 +93,13 @@
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385/",
"Audience": "webhook-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"SwaggerClientId": "vue-oauth-client"
@ -119,7 +117,7 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -141,7 +139,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

3
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.json

@ -5,6 +5,9 @@
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},
"AntiForgery": {
"AutoValidate": false
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84",

2
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/Properties/launchSettings.json

@ -13,7 +13,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://127.0.0.1:30060",
"applicationUrl": "http://localhost:30060",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

4
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/TenantHeaderParamter.cs

@ -1,5 +1,5 @@
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using Swashbuckle.AspNetCore.SwaggerGen;
using System.Collections.Generic;
using Volo.Abp.AspNetCore.MultiTenancy;
@ -23,7 +23,7 @@ public class TenantHeaderParamter : IOperationFilter
{
if (_multiTenancyOptions.IsEnabled)
{
operation.Parameters = operation.Parameters ?? new List<OpenApiParameter>();
operation.Parameters = operation.Parameters ?? new List<IOpenApiParameter>();
operation.Parameters.Add(new OpenApiParameter
{
Name = _aspNetCoreMultiTenancyOptions.TenantKey,

59
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.Configure.cs

@ -13,20 +13,23 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Routing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Logging;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Encodings.Web;
using System.Text.Unicode;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.Caching;
using Volo.Abp.EntityFrameworkCore;
@ -108,7 +111,7 @@ public partial class WechatManagementHttpApiHostModule
mysql =>
{
// see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960
mysql.TranslateParameterizedCollectionsToConstants();
mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
});
});
}
@ -136,8 +139,11 @@ public partial class WechatManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -302,25 +308,16 @@ public partial class WechatManagementHttpApiHostModule
});
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{
Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
Name = "Authorization",
In = ParameterLocation.Header,
Scheme = "bearer",
Type = SecuritySchemeType.Http,
BearerFormat = "JWT"
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
options.DescribeAllParametersInCamelCase();
var xmlDocFiles = new List<string>();
xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "LINGYUN.Abp.*.xml"));
xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "Volo.Abp.*.xml"));
foreach (var xmlDocFile in xmlDocFiles)
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" }
},
new string[] { }
}
});
options.IncludeXmlComments(xmlDocFile);
}
options.OperationFilter<TenantHeaderParamter>();
});
}
@ -426,14 +423,18 @@ public partial class WechatManagementHttpApiHostModule
}
});
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
configuration.GetSection("AntiForgery").Bind(options);
});
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
private void ConfigureWrapper()

37
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.Development.json

@ -4,14 +4,14 @@
"env": "DEV",
"appId": "LINGYUN.Abp.WechatManagement",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "LINGYUN.Abp.WechatManagement",
"tag": "LINGYUN.Abp.WechatManagement"
},
"App": {
"ShowPii": true,
"CorsOrigins": [ "http://127.0.0.1:5666" ],
"RefreshClaimsUrl": "http://127.0.0.1:30015"
"CorsOrigins": [ "http://localhost:5666" ],
"RefreshClaimsUrl": "http://localhost:30015"
},
"Auditing": {
"AllEntitiesSelector": true
@ -25,29 +25,24 @@
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15"
"Configuration": "localhost,defaultDatabase=15"
}
},
"OpenTelemetry": {
"IsEnabled": true,
"ZipKin": {
"Endpoint": "http://127.0.0.1:9411/api/v2/spans"
"Endpoint": "http://localhost:9411/api/v2/spans"
}
},
"RemoteServices": {},
"IdentityClients": {
"InternalServiceClient": {
"Authority": "http://127.0.0.1:44385",
"Authority": "http://localhost:44385",
"RequireHttps": false,
"GrantType": "client_credentials",
"Scope": "lingyun-abp-application",
@ -65,10 +60,10 @@
},
"MySql": {
"TableNamePrefix": "wechat",
"ConnectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -77,16 +72,16 @@
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385/",
"Audience": "wechat-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"SwaggerClientId": "InternalServiceClient",
"SwaggerClientSecret": "1q2w3E*"
"SwaggerClientId": "vue-oauth-client"
},
"Logging": {
"Serilog": {
@ -101,7 +96,7 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -123,7 +118,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

3
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.json

@ -5,6 +5,9 @@
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},
"AntiForgery": {
"AutoValidate": false
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84",

2
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Properties/launchSettings.json

@ -15,7 +15,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://127.0.0.1:30035"
"applicationUrl": "http://localhost:30035"
}
}
}

35
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs

@ -212,8 +212,11 @@ public partial class WorkflowManagementHttpApiHostModule
var distributedLockEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
services.AddSingleton<IDistributedLockProvider>(_ =>
{
return new RedisDistributedSynchronizationProvider(
ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase());
});
}
}
@ -461,12 +464,6 @@ public partial class WorkflowManagementHttpApiHostModule
private void ConfigureSecurity(IServiceCollection services, IConfiguration configuration, bool isDevelopment = false)
{
Configure<AbpAntiForgeryOptions>(options =>
{
options.AutoValidate = false;
//options.AutoValidateFilter = (type) => !type.Namespace.Contains("elsa", StringComparison.CurrentCultureIgnoreCase);
});
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddAbpJwtBearer(options =>
{
@ -485,18 +482,18 @@ public partial class WorkflowManagementHttpApiHostModule
}
});
//services.AddElsaJwtBearerAuthentication(options =>
//{
//});
if (!isDevelopment)
Configure<AbpAntiForgeryOptions>(options =>
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
configuration.GetSection("AntiForgery").Bind(options);
});
services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
private void ConfigureCors(IServiceCollection services, IConfiguration configuration)

15
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.DataSeeder.cs

@ -1,15 +0,0 @@
using LY.MicroService.WorkflowManagement.DataSeeder;
using Microsoft.Extensions.DependencyInjection;
namespace LY.MicroService.WorkflowManagement;
public partial class WorkflowManagementHttpApiHostModule
{
private static void ConfigureSeedWorker(IServiceCollection services, bool isDevelopment = false)
{
if (isDevelopment)
{
services.AddHostedService<WorkflowManagementDataSeederWorker>();
}
}
}

48
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json

@ -4,14 +4,14 @@
"env": "DEV",
"appId": "LINGYUN.Abp.Workflow",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "LINGYUN.Abp.Workflow",
"tag": "LINGYUN.Abp.Workflow"
},
"App": {
"CorsOrigins": [ "http://127.0.0.1:5666" ],
"CorsOrigins": [ "http://localhost:5666" ],
"ShowPii": true,
"RefreshClaimsUrl": "http://127.0.0.1:30015"
"RefreshClaimsUrl": "http://localhost:30015"
},
"Auditing": {
"AllEntitiesSelector": true
@ -25,15 +25,8 @@
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None;SslMode=None",
"Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None",
"WorkflowManagement": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None",
"AbpWorkflowCore": "Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456;SslMode=None",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"Workflow": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"Quartz": {
"UsePersistentStore": false,
@ -41,8 +34,8 @@
"quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz",
"quartz.dataSource.tkm.connectionString": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement",
"quartz.dataSource.tkm.connectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None",
"quartz.dataSource.tkm.connectionStringName": "Default",
"quartz.dataSource.tkm.provider": "MySqlConnector",
"quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json",
@ -111,23 +104,23 @@
},
"Rebus": {
"RabbitMQ": {
"Connection": "amqp://admin:123456@127.0.0.1:5672/"
"Connection": "amqp://admin:123456@localhost:5672/"
}
},
"Server": {
"BaseUrl": "http://127.0.0.1:30035"
"BaseUrl": "http://localhost:30035"
}
},
"RemoteServices": {
"AbpOssManagement": {
"BaseUrl": "http://127.0.0.1:30025",
"BaseUrl": "http://localhost:30025",
"IdentityClient": "InternalServiceClient",
"UseCurrentAccessToken": false
}
},
"IdentityClients": {
"InternalServiceClient": {
"Authority": "http://127.0.0.1:44385",
"Authority": "http://localhost:44385",
"RequireHttps": false,
"GrantType": "client_credentials",
"Scope": "lingyun-abp-application",
@ -141,7 +134,7 @@
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15"
"Configuration": "localhost,defaultDatabase=15"
}
},
"CAP": {
@ -155,10 +148,10 @@
},
"MySql": {
"TableNamePrefix": "wf",
"ConnectionString": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None"
"ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"HostName": "localhost",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
@ -167,16 +160,15 @@
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"Configuration": "localhost,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385/",
"Audience": "workflow-service",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"Scopes": "lingyun-abp-application",
"ElsaClientId": "InternalServiceClient",
"SwaggerClientId": "vue-oauth-client"
},
"Logging": {
@ -192,7 +184,7 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -214,7 +206,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

3
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.json

@ -5,6 +5,9 @@
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},
"AntiForgery": {
"AutoValidate": false
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84",

76
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/InternalGatewayModule.cs

@ -1,4 +1,6 @@
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using Autofac.Core;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.Claims.Mapping;
using LINGYUN.Abp.Serilog.Enrichers.Application;
using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
using Microsoft.AspNetCore.Authentication.JwtBearer;
@ -10,7 +12,8 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
@ -31,6 +34,7 @@ namespace LINGYUN.MicroService.Internal.Gateway;
[DependsOn(
typeof(AbpSerilogEnrichersApplicationModule),
typeof(AbpSerilogEnrichersUniqueIdModule),
typeof(AbpClaimsMappingModule),
typeof(AbpAutofacModule),
typeof(AbpDataModule),
typeof(AbpSwashbuckleModule),
@ -39,7 +43,7 @@ namespace LINGYUN.MicroService.Internal.Gateway;
)]
public class InternalGatewayModule : AbpModule
{
public static string ApplicationName { get; set; } = "Services.ApiGateWay";
public static string ApplicationName { get; set; } = "InternalApiGateway";
public override void PreConfigureServices(ServiceConfigurationContext context)
{
AbpSerilogEnrichersConsts.ApplicationName = ApplicationName;
@ -70,15 +74,14 @@ public class InternalGatewayModule : AbpModule
authority: configuration["AuthServer:Authority"],
scopes: new Dictionary<string, string>
{
{"Account", "Account API"},
{"Identity", "Identity API"},
{"IdentityServer", "Identity Server API"},
{"BackendAdmin", "Backend Admin API"},
{"Localization", "Localization API"},
{"Platform", "Platform API"},
{"RealtimeMessage", "RealtimeMessage API"},
{"TaskManagement", "Task Management API"},
{"Webhooks", "Webhooks API"},
{"identity-service", "Identity Service API"},
{"admin-service", "Admin Service API"},
{"localization-service", "Localization Service API"},
{"platform-service", "Platform Service API"},
{"message-service", "Message Service API"},
{"task-service", "Task Service API"},
{"webhook-service", "Webhook Service API"},
{"wechat-service", "WeChat Service API"},
},
options =>
{
@ -87,30 +90,47 @@ public class InternalGatewayModule : AbpModule
options.CustomSchemaIds(type => type.FullName);
});
context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
.AddJwtBearer(options =>
{
configuration.GetSection("AuthServer").Bind(options);
var validIssuers = configuration.GetSection("AuthServer:ValidIssuers").Get<List<string>>();
if (validIssuers?.Count > 0)
{
options.TokenValidationParameters.ValidIssuers = validIssuers;
options.TokenValidationParameters.IssuerValidator = TokenWildcardIssuerValidator.IssuerValidator;
}
var validAudiences = configuration.GetSection("AuthServer:ValidAudiences").Get<List<string>>();
if (validAudiences?.Count > 0)
{
configuration.GetSection("AuthServer").Bind(options);
});
options.TokenValidationParameters.ValidAudiences = validAudiences;
}
});
if (hostingEnvironment.IsProduction())
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
context.Services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
context.Services.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(() =>
{
return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase();
},
"LINGYUN.Abp.Application:DataProtection:Protection-Keys");
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
var corsOrigins = configuration.GetSection("App:CorsOrigins").Get<List<string>>();
if (corsOrigins == null || corsOrigins.Count == 0)
{
corsOrigins = configuration["App:CorsOrigins"]?
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToList() ?? new List<string>();
}
builder
.WithOrigins(
configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
.WithOrigins(corsOrigins
.Select(o => o.RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.WithAbpWrapExposedHeaders()

1
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/LINGYUN.MicroService.Internal.Gateway.csproj

@ -34,6 +34,7 @@
<ProjectReference Include="..\..\..\..\..\aspnet-core\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\aspnet-core\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />
<ProjectReference Include="..\..\..\..\..\aspnet-core\framework\mvc\LINGYUN.Abp.AspNetCore.Mvc.Wrapper\LINGYUN.Abp.AspNetCore.Mvc.Wrapper.csproj" />
<ProjectReference Include="..\..\..\..\..\aspnet-core\framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj" />
</ItemGroup>
<ItemGroup>

23
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/appsettings.Development.json

@ -4,28 +4,21 @@
"env": "DEV",
"appId": "LY.MicroService.Internal.Gateway",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "BackendAdmin",
"tag": "BackendAdmin"
},
"App": {
"CorsOrigins": "http://127.0.0.1:3100",
"CorsOrigins": [ "http://localhost:5666" ],
"ShowPii": true
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456",
"AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456",
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpTextTemplating": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"AuthServer": {
"Authority": "http://auth-server:44385/",
"Audience": "lingyun-abp-application",
"Authority": "http://localhost:44385/",
"Audience": "api-gateway",
"ValidAudiences": [ "lingyun-abp-application" ],
"MapInboundClaims": false,
"RequireHttpsMetadata": false
},
@ -42,7 +35,7 @@
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -65,7 +58,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

248
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/yarp.json

@ -1,11 +1,48 @@
{
"ReverseProxy": {
"Routes": {
"ai-management-route": {
"ClusterId": "ai-management-cluster",
"Match": {
"Path": "/api/ai-management/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat;Content-Type;Cache-Control"
}
]
},
"abp-route": {
"ClusterId": "admin-api-cluster",
"ClusterId": "admin-service-cluster",
"Match": {
"Path": "/api/abp/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
},
{
"ResponseHeadersCopy": true
},
{
"ResponseHeader": "Set-Cookie",
"Append": true
}
]
},
"oidc-discovery-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/.well-known/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
@ -16,7 +53,7 @@
}
]
},
"auth-server-route": {
"oidc-token-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/connect/{**everything}"
@ -31,8 +68,53 @@
}
]
},
"account-external-logins-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/api/account/external-logins/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"account-oauth-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/api/account/oauth/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"account-qrcode-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/api/account/qrcode/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"account-route": {
"ClusterId": "auth-server-api-cluster",
"ClusterId": "identity-service-cluster",
"Match": {
"Path": "/api/account/{**everything}"
},
@ -47,7 +129,7 @@
]
},
"identity-route": {
"ClusterId": "auth-server-api-cluster",
"ClusterId": "identity-service-cluster",
"Match": {
"Path": "/api/identity/{**everything}"
},
@ -62,7 +144,7 @@
]
},
"identity-server-route": {
"ClusterId": "auth-server-api-cluster",
"ClusterId": "identity-service-cluster",
"Match": {
"Path": "/api/identity-server/{**everything}"
},
@ -76,8 +158,23 @@
}
]
},
"openiddict-route": {
"ClusterId": "identity-service-cluster",
"Match": {
"Path": "/api/openiddict/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"cache-management-route": {
"ClusterId": "admin-api-cluster",
"ClusterId": "admin-service-cluster",
"Match": {
"Path": "/api/caching-management/{**everything}"
},
@ -92,7 +189,7 @@
]
},
"saas-route": {
"ClusterId": "admin-api-cluster",
"ClusterId": "admin-service-cluster",
"Match": {
"Path": "/api/saas/{**everything}"
},
@ -107,7 +204,7 @@
]
},
"auditing-route": {
"ClusterId": "admin-api-cluster",
"ClusterId": "admin-service-cluster",
"Match": {
"Path": "/api/auditing/{**everything}"
},
@ -122,7 +219,7 @@
]
},
"data-protected-route": {
"ClusterId": "admin-api-cluster",
"ClusterId": "admin-service-cluster",
"Match": {
"Path": "/api/data-protection-management/{**everything}"
},
@ -137,7 +234,7 @@
]
},
"text-template-route": {
"ClusterId": "admin-api-cluster",
"ClusterId": "admin-service-cluster",
"Match": {
"Path": "/api/text-templating/{**everything}"
},
@ -152,7 +249,7 @@
]
},
"feature-management-route": {
"ClusterId": "admin-api-cluster",
"ClusterId": "admin-service-cluster",
"Match": {
"Path": "/api/feature-management/{**everything}"
},
@ -167,7 +264,7 @@
]
},
"permission-management-route": {
"ClusterId": "admin-api-cluster",
"ClusterId": "admin-service-cluster",
"Match": {
"Path": "/api/permission-management/{**everything}"
},
@ -182,7 +279,7 @@
]
},
"setting-management-route": {
"ClusterId": "admin-api-cluster",
"ClusterId": "admin-service-cluster",
"Match": {
"Path": "/api/setting-management/{**everything}"
},
@ -197,7 +294,7 @@
]
},
"localization-management-route": {
"ClusterId": "localization-api-cluster",
"ClusterId": "localization-service-cluster",
"Match": {
"Path": "/api/localization/{**everything}"
},
@ -212,7 +309,7 @@
]
},
"im-route": {
"ClusterId": "messages-api-cluster",
"ClusterId": "messages-service-cluster",
"Match": {
"Path": "/api/im/{**everything}"
},
@ -227,7 +324,7 @@
]
},
"notifications-route": {
"ClusterId": "messages-api-cluster",
"ClusterId": "messages-service-cluster",
"Match": {
"Path": "/api/notifications/{**everything}"
},
@ -241,8 +338,8 @@
}
]
},
"signalr-route": {
"ClusterId": "messages-api-cluster",
"signalr-hubs-route": {
"ClusterId": "messages-service-cluster",
"Match": {
"Path": "/signalr-hubs/{**everything}"
},
@ -262,8 +359,8 @@
}
]
},
"webhooks-management-route": {
"ClusterId": "webhooks-api-cluster",
"webhooks-route": {
"ClusterId": "webhooks-service-cluster",
"Match": {
"Path": "/api/webhooks/{**everything}"
},
@ -278,7 +375,7 @@
]
},
"task-management-route": {
"ClusterId": "tasks-api-cluster",
"ClusterId": "task-service-cluster",
"Match": {
"Path": "/api/task-management/{**everything}"
},
@ -293,7 +390,7 @@
]
},
"platform-route": {
"ClusterId": "platform-api-cluster",
"ClusterId": "platform-service-cluster",
"Match": {
"Path": "/api/platform/{**everything}"
},
@ -307,10 +404,10 @@
}
]
},
"oss-route": {
"ClusterId": "platform-api-cluster",
"blob-management-route": {
"ClusterId": "platform-service-cluster",
"Match": {
"Path": "/api/oss-management/{**everything}"
"Path": "/api/blob-management/{**everything}"
},
"Transforms": [
{
@ -323,7 +420,7 @@
]
},
"files-route": {
"ClusterId": "platform-api-cluster",
"ClusterId": "platform-service-cluster",
"Match": {
"Path": "/api/files/{**everything}"
},
@ -336,95 +433,142 @@
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"wechat-route": {
"ClusterId": "wechat-service-cluster",
"Match": {
"Path": "/api/wechat/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"elsa-route": {
"ClusterId": "workflow-service-cluster",
"Match": {
"Path": "/elsa/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
}
},
"Clusters": {
"ai-management-cluster": {
"Destinations": {
"destination1": {
"Address": "http://localhost:30070",
"Metadata": {
"SwaggerEndpoint": "http://localhost:30070"
}
}
}
},
"auth-server-cluster": {
"Destinations": {
"destination1": {
"Address": "http://auth-server:44385",
"Address": "http://localhost:44385"
}
}
},
"identity-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://localhost:30015",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:44385"
"SwaggerEndpoint": "http://localhost:30015"
}
}
}
},
"auth-server-api-cluster": {
"admin-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://auth-server-api:30015",
"Address": "http://localhost:30010",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30015"
"SwaggerEndpoint": "http://localhost:30010"
}
}
}
},
"admin-api-cluster": {
"localization-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://admin-api:30010",
"Address": "http://localhost:30030",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30010"
"SwaggerEndpoint": "http://localhost:30030"
}
}
}
},
"localization-api-cluster": {
"messages-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://localization-api:30030",
"Address": "http://localhost:30020",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30030"
"SwaggerEndpoint": "http://localhost:30020"
}
}
}
},
"messages-api-cluster": {
"webhooks-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://messages-api:30020",
"Address": "http://localhost:30045",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30020"
"SwaggerEndpoint": "http://localhost:30045"
}
}
}
},
"webhooks-api-cluster": {
"task-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://webhooks-api:30045",
"Address": "http://localhost:30040",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30045"
"SwaggerEndpoint": "http://localhost:30040"
}
}
}
},
"tasks-api-cluster": {
"platform-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://tasks-api:30040",
"Address": "http://localhost:30025",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30040"
"SwaggerEndpoint": "http://localhost:30025"
}
}
}
},
"platform-api-cluster": {
"workflow-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://platform-api:30025",
"Address": "http://localhost:30050",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30025"
"SwaggerEndpoint": "http://localhost:30050"
}
}
}
},
"workflow-api-cluster": {
"wechat-service-cluster": {
"Destinations": {
"destination1": {
"Address": "http://workflow-api:30050",
"Address": "http://localhost:30060",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30050"
"SwaggerEndpoint": "http://localhost:30060"
}
}
}

19
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.OpenApi.Gateway/OpenApiGatewayModule.cs

@ -41,7 +41,7 @@ namespace LINGYUN.MicroService.OpenApi.Gateway;
)]
public class OpenApiGatewayModule : AbpModule
{
public static string ApplicationName { get; set; } = "Services.OpenApi.GateWay";
public static string ApplicationName { get; set; } = "OpenApiGateWay";
public override void PreConfigureServices(ServiceConfigurationContext context)
{
AbpSerilogEnrichersConsts.ApplicationName = ApplicationName;
@ -94,15 +94,14 @@ public class OpenApiGatewayModule : AbpModule
authority: configuration["AuthServer:Authority"],
scopes: new Dictionary<string, string>
{
{"Account", "Account API"},
{"Identity", "Identity API"},
{"IdentityServer", "Identity Server API"},
{"BackendAdmin", "Backend Admin API"},
{"Localization", "Localization API"},
{"Platform", "Platform API"},
{"RealtimeMessage", "RealtimeMessage API"},
{"TaskManagement", "Task Management API"},
{"Webhooks", "Webhooks API"},
{"identity-service", "Identity Service API"},
{"admin-service", "Admin Service API"},
{"localization-service", "Localization Service API"},
{"platform-service", "Platform Service API"},
{"message-service", "Message Service API"},
{"task-service", "Task Service API"},
{"webhook-service", "Webhook Service API"},
{"wechat-service", "WeChat Service API"},
},
options =>
{

22
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.OpenApi.Gateway/appsettings.Development.json

@ -4,27 +4,19 @@
"env": "DEV",
"appId": "LY.MicroService.Internal.Gateway",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:5000",
"nodes": "http://localhost:5000",
"name": "BackendAdmin",
"tag": "BackendAdmin"
},
"App": {
"CorsOrigins": "http://127.0.0.1:3100,http://localhost:9010",
"CorsOrigins": "http://localhost:3100,http://localhost:9010",
"ShowPii": true
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456",
"AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456",
"AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456",
"AbpTextTemplating": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456"
"Default": "Server=localhost;Database=abp;User Id=root;Password=123456"
},
"AuthServer": {
"Authority": "http://auth-server:44385/",
"Authority": "http://localhost:44385/",
"Audience": "lingyun-abp-application",
"MapInboundClaims": false,
"RequireHttpsMetadata": false
@ -62,11 +54,11 @@
},
"Redis": {
"IsEnabled": true,
"Configuration": "127.0.0.1,defaultDatabase=15",
"Configuration": "localhost,defaultDatabase=15",
"InstanceName": "LINGYUN.Abp.Application"
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
"NodeUris": "http://localhost:9200"
},
"Serilog": {
"MinimumLevel": {
@ -89,7 +81,7 @@
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"nodeUris": "http://localhost:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"

Loading…
Cancel
Save