Browse Source

upgrade abp framework to 8.0.3

pull/933/head 8.0.3
colin 2 years ago
parent
commit
338ddec533
  1. 7
      apps/vue/src/store/modules/permission.ts
  2. 4
      aspnet-core/Directory.Build.props
  3. 2
      aspnet-core/common.props
  4. 381
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml
  5. 6
      aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/LY.MicroService.Applications.Single.DbMigrator.csproj
  6. 3
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application.Contracts/LINGYUN/Abp/OssManagement/IShareFileAppService.cs
  7. 2
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploader.cs
  8. 17
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/ShareFileAppService.cs
  9. 18
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs
  10. 10
      aspnet-core/modules/platform/LINGYUN.Abp.UI.Navigation.VueVbenAdmin/LINGYUN/Abp/UI/Navigation/VueVbenAdmin/AbpUINavigationVueVbenAdminNavigationDefinitionProvider.cs
  11. 5
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs
  12. 10
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs
  13. 5
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs
  14. 23
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.Configure.cs
  15. 7
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs
  16. 1
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.Development.json
  17. 13
      aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs
  18. 12
      aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs
  19. 6
      aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/appsettings.Development.json
  20. 7
      aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.Configure.cs
  21. 5
      aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.cs
  22. 6
      aspnet-core/services/LY.MicroService.IdentityServer/appsettings.Development.json
  23. 1818
      aspnet-core/services/LY.MicroService.IdentityServer/package-lock.json
  24. 5232
      aspnet-core/services/LY.MicroService.IdentityServer/yarn.lock
  25. 10
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs
  26. 1
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs
  27. 10
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs
  28. 1
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs
  29. 10
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs
  30. 1
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs
  31. 10
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs
  32. 3
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs
  33. 10
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs
  34. 6
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs
  35. 10
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs
  36. 6
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.cs
  37. 13
      aspnet-core/templates/content/.template.config/template.json
  38. 5
      aspnet-core/templates/content/.template.config/template.zh-Hans.json
  39. 4
      aspnet-core/templates/content/Directory.Build.props
  40. 10
      aspnet-core/templates/content/common.props
  41. 1
      aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/PackageName.CompanyName.ProjectName.HttpApi.Host.csproj
  42. 12
      aspnet-core/templates/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbMigrationEventHandler.cs
  43. 2
      common.props
  44. 4
      gateways/Directory.Build.props
  45. 2
      gateways/common.props

7
apps/vue/src/store/modules/permission.ts

@ -3,6 +3,8 @@ import type { AppRouteRecordRaw, Menu, RouteMeta } from '/@/router/types';
import { defineStore } from 'pinia';
import { store } from '/@/store';
import { useI18n } from '/@/hooks/web/useI18n';
import { useLocalization } from '/@/hooks/abp/useLocalization';
import { useLocalizationSerializer } from '/@/hooks/abp/useLocalizationSerializer';
import { useUserStore } from './user';
import { useAbpStoreWithOut } from './abp';
import { useAppStoreWithOut } from './app';
@ -223,11 +225,14 @@ export const usePermissionStore = defineStore({
return routes;
},
filterDynamicRoutes(menus: RouteItem[]) {
const { deserialize } = useLocalizationSerializer();
const { Lr } = useLocalization();
const routeList: AppRouteRecordRaw[] = [];
menus.forEach((menu) => {
if (!this.validationFeatures(menu.meta)) {
return;
}
const titleInfo = deserialize(menu.meta.title);
const r: AppRouteRecordRaw = {
path: menu.path,
name: menu.name!,
@ -235,7 +240,7 @@ export const usePermissionStore = defineStore({
component: menu.component,
meta: {
affix: mapMetaBoolean('affix', menu.meta),
title: menu.meta.title,
title: Lr(titleInfo.resourceName, titleInfo.name),
icon: menu.meta.icon,
ignoreAuth: mapMetaBoolean('ignoreAuth', menu.meta),
ignoreKeepAlive: mapMetaBoolean('ignoreKeepAlive', menu.meta),

4
aspnet-core/Directory.Build.props

@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<VoloAbpPackageVersion>8.0.3</VoloAbpPackageVersion>
<VoloAbpPackageVersion>8.0.4</VoloAbpPackageVersion>
<VoloAbpLeptonXThemePackageVersion>3.0.0</VoloAbpLeptonXThemePackageVersion>
<LINGYUNAbpPackageVersion>8.0.3</LINGYUNAbpPackageVersion>
<LINGYUNAbpPackageVersion>8.0.4</LINGYUNAbpPackageVersion>
<DaprPackageVersion>1.12.0</DaprPackageVersion>
<DistributedLockRedisPackageVersion>1.0.2</DistributedLockRedisPackageVersion>
<DotNetCoreCAPPackageVersion>8.0.0</DotNetCoreCAPPackageVersion>

2
aspnet-core/common.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>8.0.3</Version>
<Version>8.0.4</Version>
<Authors>colin</Authors>
<NoWarn>$(NoWarn);CS1591;CS0436;CS8618;NU1803</NoWarn>
<PackageProjectUrl>https://github.com/colinin/abp-next-admin</PackageProjectUrl>

381
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml

@ -0,0 +1,381 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>LINGYUN.Abp.EventBus.CAP</name>
</assembly>
<members>
<member name="T:LINGYUN.Abp.EventBus.CAP.AbpCAPConsumerServiceSelector">
<summary>
消费者查找器
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPConsumerServiceSelector.CapOptions">
<summary>
CAP配置
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPConsumerServiceSelector.AbpDistributedEventBusOptions">
<summary>
Abp分布式事件配置
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPConsumerServiceSelector.ServiceProvider">
<summary>
服务提供者
</summary>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPConsumerServiceSelector.#ctor(System.IServiceProvider,Microsoft.Extensions.Options.IOptions{DotNetCore.CAP.CapOptions},Microsoft.Extensions.Options.IOptions{Volo.Abp.EventBus.Distributed.AbpDistributedEventBusOptions})">
<summary>
Creates a new <see cref="T:DotNetCore.CAP.Internal.ConsumerServiceSelector" />.
</summary>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPConsumerServiceSelector.FindConsumersFromInterfaceTypes(System.IServiceProvider)">
<summary>
查找消费者集合
</summary>
<param name="provider"></param>
<returns></returns>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPConsumerServiceSelector.GetHandlerDescription(System.Type,System.Type)">
<summary>
获取事件处理器集合
</summary>
<param name="eventType"></param>
<param name="typeInfo"></param>
<returns></returns>
</member>
<member name="T:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusModule">
<summary>
AbpCAPEventBusModule
</summary>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusModule.ConfigureServices(Volo.Abp.Modularity.ServiceConfigurationContext)">
<summary>
ConfigureServices
</summary>
<param name="context"></param>
</member>
<member name="T:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions">
<summary>
过期消息清理配置项
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions.NotifyFailedCallback">
<summary>
发布消息处理失败通知
default: false
</summary>
</member>
<member name="T:LINGYUN.Abp.EventBus.CAP.AbpCAPExecutionFailedException">
<summary>
AbpECAPExecutionFailedException
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPExecutionFailedException.MessageType">
<summary>
MessageType
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPExecutionFailedException.Origin">
<summary>
Message
</summary>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPExecutionFailedException.#ctor(DotNetCore.CAP.Messages.MessageType,DotNetCore.CAP.Messages.Message)">
<summary>
constructor
</summary>
<param name="messageType"></param>
<param name="origin"></param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPExecutionFailedException.#ctor(DotNetCore.CAP.Messages.MessageType,DotNetCore.CAP.Messages.Message,System.String)">
<summary>
constructor
</summary>
<param name="messageType"></param>
<param name="origin"></param>
<param name="message"></param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPExecutionFailedException.#ctor(DotNetCore.CAP.Messages.MessageType,DotNetCore.CAP.Messages.Message,System.String,System.Exception)">
<summary>
constructor
</summary>
<param name="messageType"></param>
<param name="origin"></param>
<param name="message"></param>
<param name="innerException"></param>
</member>
<member name="T:LINGYUN.Abp.EventBus.CAP.AbpCAPMessageExtensions">
<summary>
CAP消息扩展
</summary>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPMessageExtensions.TryGetTenantId(DotNetCore.CAP.Messages.Message,System.Nullable{System.Guid}@)">
<summary>
尝试获取消息标头中的租户标识
</summary>
<param name="message"></param>
<param name="tenantId"></param>
<returns></returns>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPMessageExtensions.GetTenantIdOrNull(DotNetCore.CAP.Messages.Message)">
<summary>
获取消息标头中的租户标识
</summary>
<param name="message"></param>
<returns></returns>
</member>
<member name="T:LINGYUN.Abp.EventBus.CAP.AbpCAPSubscribeInvoker">
<summary>
重写 ISubscribeInvoker 实现 Abp 租户集成
</summary>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPSubscribeInvoker.#ctor(Microsoft.Extensions.Logging.ILoggerFactory,System.IServiceProvider,DotNetCore.CAP.Serialization.ISerializer,Volo.Abp.MultiTenancy.ICurrentTenant)">
<summary>
AbpCAPSubscribeInvoker
</summary>
<param name="loggerFactory"></param>
<param name="serviceProvider"></param>
<param name="serializer"></param>
<param name="currentTenant"></param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPSubscribeInvoker.InvokeAsync(DotNetCore.CAP.Internal.ConsumerContext,System.Threading.CancellationToken)">
<summary>
调用订阅者方法
</summary>
<param name="context"></param>
<param name="cancellationToken"></param>
<returns></returns>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPSubscribeInvoker.GetCapProvidedParameter(DotNetCore.CAP.Internal.ParameterDescriptor,DotNetCore.CAP.Messages.Message,System.Threading.CancellationToken)">
<summary>
</summary>
<param name="parameterDescriptor"></param>
<param name="message"></param>
<param name="cancellationToken"></param>
<returns></returns>
<exception cref="T:System.ArgumentException"></exception>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPSubscribeInvoker.GetInstance(System.IServiceProvider,DotNetCore.CAP.Internal.ConsumerContext)">
<summary>
获取事件处理类实例
</summary>
<param name="provider"></param>
<param name="context"></param>
<returns></returns>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPSubscribeInvoker.ExecuteWithParameterAsync(LINGYUN.Abp.EventBus.CAP.Internal.ObjectMethodExecutor,System.Object,System.Object[])">
<summary>
通过给定的类型实例与参数调用订阅者方法
</summary>
<param name="executor"></param>
<param name="class"></param>
<param name="parameter"></param>
<returns></returns>
</member>
<member name="T:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus">
<summary>
CAP分布式事件总线
</summary>
</member>
<member name="F:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.CapPublisher">
<summary>
CAP消息发布接口
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.CustomDistributedEventSubscriber">
<summary>
自定义事件注册接口
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.HandlerFactories">
<summary>
本地事件处理器工厂对象集合
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.EventTypes">
<summary>
本地事件集合
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.CurrentUser">
<summary>
当前用户
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.CurrentClient">
<summary>
当前客户端
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.JsonSerializer">
<summary>
typeof <see cref="T:Volo.Abp.Json.IJsonSerializer"/>
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.CancellationTokenProvider">
<summary>
取消令牌
</summary>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.#ctor(Microsoft.Extensions.DependencyInjection.IServiceScopeFactory,Microsoft.Extensions.Options.IOptions{Volo.Abp.EventBus.Distributed.AbpDistributedEventBusOptions},DotNetCore.CAP.ICapPublisher,Volo.Abp.Users.ICurrentUser,Volo.Abp.Clients.ICurrentClient,Volo.Abp.MultiTenancy.ICurrentTenant,Volo.Abp.Json.IJsonSerializer,Volo.Abp.Uow.IUnitOfWorkManager,Volo.Abp.Guids.IGuidGenerator,Volo.Abp.Timing.IClock,Volo.Abp.Threading.ICancellationTokenProvider,LINGYUN.Abp.EventBus.CAP.ICustomDistributedEventSubscriber,Volo.Abp.EventBus.IEventHandlerInvoker,Volo.Abp.EventBus.Local.ILocalEventBus,Volo.Abp.Tracing.ICorrelationIdProvider)">
<summary>
constructor
</summary>
<param name="serviceScopeFactory"></param>
<param name="distributedEventBusOptions"></param>
<param name="capPublisher"></param>
<param name="currentUser"></param>
<param name="currentClient"></param>
<param name="currentTenant"></param>
<param name="jsonSerializer"></param>
<param name="unitOfWorkManager"></param>
<param name="cancellationTokenProvider"></param>
<param name="guidGenerator"></param>
<param name="clock"></param>
<param name="customDistributedEventSubscriber"></param>
<param name="eventHandlerInvoker"></param>
<param name="localEventBus"></param>
<param name="correlationIdProvider"></param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.Subscribe(System.Type,Volo.Abp.EventBus.IEventHandlerFactory)">
<summary>
订阅事件
</summary>
<param name="eventType"></param>
<param name="factory"></param>
<returns></returns>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.Unsubscribe``1(System.Func{``0,System.Threading.Tasks.Task})">
<summary>
退订事件
</summary>
<typeparam name="TEvent">事件类型</typeparam>
<param name="action"></param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.Unsubscribe(System.Type,Volo.Abp.EventBus.IEventHandler)">
<summary>
退订事件
</summary>
<param name="eventType">事件类型</param>
<param name="handler">事件处理器</param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.Unsubscribe(System.Type,Volo.Abp.EventBus.IEventHandlerFactory)">
<summary>
退订事件
</summary>
<param name="eventType">事件类型</param>
<param name="factory">事件处理器工厂</param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.UnsubscribeAll(System.Type)">
<summary>
退订所有事件
</summary>
<param name="eventType">事件类型</param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.PublishToEventBusAsync(System.Type,System.Object)">
<summary>
发布事件
</summary>
<param name="eventType">事件类型</param>
<param name="eventData">事件数据对象</param>
<returns></returns>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.CAPDistributedEventBus.GetHandlerFactories(System.Type)">
<summary>
获取事件处理器工厂列表
</summary>
<param name="eventType"></param>
<returns></returns>
</member>
<member name="T:LINGYUN.Abp.EventBus.CAP.ICustomDistributedEventSubscriber">
<summary>
自定义事件订阅者
</summary>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.ICustomDistributedEventSubscriber.Subscribe(System.Type,Volo.Abp.EventBus.IEventHandlerFactory)">
<summary>
订阅事件
</summary>
<param name="eventType"></param>
<param name="factory"></param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.ICustomDistributedEventSubscriber.UnSubscribe(System.Type,Volo.Abp.EventBus.IEventHandlerFactory)">
<summary>
取消订阅
</summary>
<param name="eventType"></param>
<param name="factory"></param>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.Internal.ObjectMethodExecutor.Execute(System.Object,System.Object[])">
<summary>
Executes the configured method on <paramref name="target" />. This can be used whether or not
the configured method is asynchronous.
</summary>
<remarks>
Even if the target method is asynchronous, it's desirable to invoke it using Execute rather than
ExecuteAsync if you know at compile time what the return type is, because then you can directly
"await" that value (via a cast), and then the generated code will be able to reference the
resulting awaitable as a value-typed variable. If you use ExecuteAsync instead, the generated
code will have to treat the resulting awaitable as a boxed object, because it doesn't know at
compile time what type it would be.
</remarks>
<param name="target">The object whose method is to be executed.</param>
<param name="parameters">Parameters to pass to the method.</param>
<returns>The method return value.</returns>
</member>
<member name="M:LINGYUN.Abp.EventBus.CAP.Internal.ObjectMethodExecutor.ExecuteAsync(System.Object,System.Object[])">
<summary>
Executes the configured method on <paramref name="target" />. This can only be used if the configured
method is asynchronous.
</summary>
<remarks>
If you don't know at compile time the type of the method's returned awaitable, you can use ExecuteAsync,
which supplies an awaitable-of-object. This always works, but can incur several extra heap allocations
as compared with using Execute and then using "await" on the result value typecasted to the known
awaitable type. The possible extra heap allocations are for:
1. The custom awaitable (though usually there's a heap allocation for this anyway, since normally
it's a reference type, and you normally create a new instance per call).
2. The custom awaiter (whether or not it's a value type, since if it's not, you need a new instance
of it, and if it is, it will have to be boxed so the calling code can reference it as an object).
3. The async result value, if it's a value type (it has to be boxed as an object, since the calling
code doesn't know what type it's going to be).
</remarks>
<param name="target">The object whose method is to be executed.</param>
<param name="parameters">Parameters to pass to the method.</param>
<returns>An object that you can "await" to get the method return value.</returns>
</member>
<member name="T:LINGYUN.Abp.EventBus.CAP.Internal.ObjectMethodExecutorAwaitable">
<summary>
Provides a common awaitable structure that <see cref="M:LINGYUN.Abp.EventBus.CAP.Internal.ObjectMethodExecutor.ExecuteAsync(System.Object,System.Object[])" /> can
return, regardless of whether the underlying value is a System.Task, an FSharpAsync, or an
application-defined custom awaitable.
</summary>
</member>
<member name="T:LINGYUN.Abp.EventBus.CAP.Internal.ObjectMethodExecutorFSharpSupport">
<summary>
Helper for detecting whether a given type is FSharpAsync`1, and if so, supplying
an <see cref="T:System.Linq.Expressions.Expression" /> for mapping instances of that type to a C# awaitable.
</summary>
<remarks>
The main design goal here is to avoid taking a compile-time dependency on
FSharp.Core.dll, because non-F# applications wouldn't use it. So all the references
to FSharp types have to be constructed dynamically at runtime.
</remarks>
</member>
<member name="T:Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions">
<summary>
CAP ServiceCollectionExtensions
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.AddCAPEventBus(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{DotNetCore.CAP.CapOptions})">
<summary>
Adds and configures the consistence services for the consistency.
</summary>
<param name="services"></param>
<param name="capAction"></param>
<returns></returns>
</member>
</members>
</doc>

6
aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/LY.MicroService.Applications.Single.DbMigrator.csproj

@ -28,15 +28,9 @@
<ItemGroup>
<None Remove="appsettings.json" />
<None Remove="appsettings.Production.json" />
</ItemGroup>
<ItemGroup>
<Content Include="appsettings.Production.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>

3
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application.Contracts/LINGYUN/Abp/OssManagement/IShareFileAppService.cs

@ -1,11 +1,12 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Content;
namespace LINGYUN.Abp.OssManagement
{
public interface IShareFileAppService : IApplicationService
{
Task<GetFileShareDto> GetAsync(string url);
Task<IRemoteStreamContent> GetAsync(string url);
}
}

2
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/FileUploader.cs

@ -92,7 +92,7 @@ namespace LINGYUN.Abp.OssManagement
catch
{
// 发生异常删除临时文件目录
Directory.Delete(tempFilePath, true);
DirectoryHelper.DeleteIfExists(tempFilePath, true);
throw;
}
}

17
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/ShareFileAppService.cs

@ -1,9 +1,12 @@
using LINGYUN.Abp.OssManagement.Features;
using Microsoft.Extensions.Caching.Distributed;
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Caching;
using Volo.Abp.Content;
using Volo.Abp.Http;
namespace LINGYUN.Abp.OssManagement
{
@ -23,17 +26,17 @@ namespace LINGYUN.Abp.OssManagement
_ossContainerFactory = ossContainerFactory;
}
public async virtual Task<GetFileShareDto> GetAsync(string url)
public async virtual Task<IRemoteStreamContent> GetAsync(string url)
{
if (!await FeatureChecker.IsEnabledAsync(AbpOssManagementFeatureNames.OssObject.AllowSharedFile))
{
return new GetFileShareDto(url);
return new RemoteStreamContent(Stream.Null);
}
var cacheKey = FileShareCacheItem.CalculateCacheKey(url);
var cacheItem = await _shareCache.GetAsync(cacheKey);
if (cacheItem == null)
{
return new GetFileShareDto(url);
return new RemoteStreamContent(Stream.Null);
}
// 最大访问次数
@ -46,7 +49,7 @@ namespace LINGYUN.Abp.OssManagement
{
await _shareCache.RemoveAsync(cacheKey);
return new GetFileShareDto(url);
return new RemoteStreamContent(Stream.Null);
}
// 共享用户
@ -54,7 +57,7 @@ namespace LINGYUN.Abp.OssManagement
{
if (cacheItem.Users.Any((userName) => !userName.Equals(CurrentUser.UserName)))
{
return new GetFileShareDto(url);
return new RemoteStreamContent(Stream.Null);
}
}
@ -63,7 +66,7 @@ namespace LINGYUN.Abp.OssManagement
{
if (cacheItem.Roles.Any((role) => !CurrentUser.Roles.Contains(role)))
{
return new GetFileShareDto(url);
return new RemoteStreamContent(Stream.Null);
}
}
@ -90,7 +93,7 @@ namespace LINGYUN.Abp.OssManagement
cacheItem,
cacheOptions);
return new GetFileShareDto(ossObject.Name, ossObject.Content);
return new RemoteStreamContent(ossObject.Content, ossObject.Name, MimeTypes.GetByExtension(ossObject.Name), ossObject.Size);
}
protected async virtual Task RefreshUserShareAsync(FileShareCacheItem shareCacheItem)

18
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs

@ -1,12 +1,9 @@
using LINGYUN.Abp.OssManagement.Localization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Http;
using Volo.Abp.Content;
namespace LINGYUN.Abp.OssManagement
{
@ -14,7 +11,7 @@ namespace LINGYUN.Abp.OssManagement
[Route("api/files/share")]
[RemoteService(false)]
[ApiExplorerSettings(IgnoreApi = true)]
public class ShareFilesController : AbpController
public class ShareFilesController : AbpController, IShareFileAppService
{
private readonly IShareFileAppService _service;
@ -28,16 +25,9 @@ namespace LINGYUN.Abp.OssManagement
[HttpGet]
[Route("{url}")]
public async virtual Task<IActionResult> GetAsync(string url)
public virtual Task<IRemoteStreamContent> GetAsync(string url)
{
var ossObject = await _service.GetAsync(url);
if (ossObject.Content.IsNullOrEmpty())
{
return NotFound();
}
return File(ossObject.Content, MimeTypes.GetByExtension(Path.GetExtension(ossObject.Name)));
return _service.GetAsync(url);
}
}
}

10
aspnet-core/modules/platform/LINGYUN.Abp.UI.Navigation.VueVbenAdmin/LINGYUN/Abp/UI/Navigation/VueVbenAdmin/AbpUINavigationVueVbenAdminNavigationDefinitionProvider.cs

@ -214,12 +214,14 @@ namespace LINGYUN.Abp.UI.Navigation.VueVbenAdmin
var removedIdsVersion = false;
var assembly = typeof(AbpUINavigationVueVbenAdminNavigationDefinitionProvider).Assembly;
var versionAttr = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
var versionAttr = assembly.GetCustomAttribute<AssemblyFileVersionAttribute>();
if (versionAttr != null)
{
var version = new Version(versionAttr.InformationalVersion);
var version6 = new Version("6.0.0");
removedIdsVersion = version6 >= version;
if (Version.TryParse(versionAttr.Version, out var version))
{
var version6 = new Version("6.0.0");
removedIdsVersion = version6 >= version;
}
}
if (!removedIdsVersion)

5
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs

@ -59,6 +59,7 @@ using Volo.Abp.MultiTenancy;
using Volo.Abp.OpenIddict;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Quartz;
using Volo.Abp.Security.Claims;
using Volo.Abp.SettingManagement;
using Volo.Abp.TextTemplating;
using Volo.Abp.Threading;
@ -616,6 +617,10 @@ public partial class MicroServiceApplicationsSingleModule
identityConfiguration.Bind(options);
}
});
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureMvcUiTheme()

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

@ -38,6 +38,7 @@ using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.OpenIddict.Localization;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Security.Claims;
using Volo.Abp.Threading;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.VirtualFileSystem;
@ -272,6 +273,14 @@ public partial class AuthServerHttpApiHostModule
}
}
private void ConfigureIdentity()
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureSwagger(IServiceCollection services)
{
// Swagger
@ -362,6 +371,7 @@ public partial class AuthServerHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.MapInboundClaims = false;
});
if (isDevelopment)

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

@ -80,6 +80,7 @@ public partial class AuthServerHttpApiHostModule : AbpModule
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureIdentity();
ConfigureDbContext();
ConfigureLocalization();
ConfigreExceptionHandling();
@ -113,9 +114,7 @@ public partial class AuthServerHttpApiHostModule : AbpModule
app.UseCors(DefaultCorsPolicyName);
// 认证
app.UseAuthentication();
// IDS与JWT不匹配可能造成鉴权错误
// TODO: abp在某个更新版本建议移除此中间价
app.UseAbpClaimsMap();
app.UseDynamicClaims();
// 多租户
app.UseMultiTenancy();
// 授权

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

@ -39,6 +39,10 @@ using Volo.Abp.PermissionManagement;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
using Microsoft.IdentityModel.Logging;
using Microsoft.AspNetCore.Identity;
using Volo.Abp.Security.Claims;
using Volo.Abp.SettingManagement;
using Volo.Abp.AspNetCore.Authentication.JwtBearer.DynamicClaims;
namespace LY.MicroService.BackendAdmin;
@ -141,12 +145,21 @@ public partial class BackendAdminHttpApiHostModule
{
Configure<PermissionManagementOptions>(options =>
{
options.IsDynamicPermissionStoreEnabled = true;
// Rename IdentityServer.Client.ManagePermissions
// See https://github.com/abpframework/abp/blob/dev/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/Volo/Abp/PermissionManagement/IdentityServer/AbpPermissionManagementDomainIdentityServerModule.cs
options.ProviderPolicies[ClientPermissionValueProvider.ProviderName] = "AbpIdentityServer.Clients.ManagePermissions";
});
}
private void ConfigureSettingManagement()
{
Configure<SettingManagementOptions>(options =>
{
options.IsDynamicSettingStoreEnabled = true;
});
}
private void ConfigureExceptionHandling()
{
// 自定义需要处理的异常
@ -234,6 +247,15 @@ public partial class BackendAdminHttpApiHostModule
}
}
private void ConfigureIdentity(IConfiguration configuration)
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
options.RemoteRefreshUrl = configuration["AuthServerUrl"] + options.RemoteRefreshUrl;
});
}
private void ConfigureAuditing(IConfiguration configuration)
{
Configure<AbpAuditingOptions>(options =>
@ -352,6 +374,7 @@ public partial class BackendAdminHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.MapInboundClaims = false;
});
if (isDevelopment)

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

@ -118,8 +118,10 @@ public partial class BackendAdminHttpApiHostModule : AbpModule
ConfigureExceptionHandling();
ConfigureVirtualFileSystem();
ConfigureTextTemplating();
ConfigureSettingManagement();
ConfigureFeatureManagement();
ConfigurePermissionManagement();
ConfigureIdentity(configuration);
ConfigureCaching(configuration);
ConfigureAuditing(configuration);
ConfigureSwagger(context.Services);
@ -146,11 +148,8 @@ public partial class BackendAdminHttpApiHostModule : AbpModule
app.UseCors(DefaultCorsPolicyName);
// 认证
app.UseAuthentication();
// IDS与JWT不匹配可能造成鉴权错误
// TODO: abp在某个更新版本建议移除此中间价
app.UseAbpClaimsMap();
// jwt
app.UseJwtTokenMiddleware();
app.UseDynamicClaims();
// 多租户
app.UseMultiTenancy();
// 授权

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

@ -18,6 +18,7 @@
"CorsOrigins": "http://127.0.0.1:3100",
"ShowPii": true
},
"AuthServerUrl": "http://127.0.0.1:30015",
"Auditing": {
"AllEntitiesSelector": true
},

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

@ -40,6 +40,10 @@ using Volo.Abp.IdentityServer.Localization;
using Microsoft.IdentityModel.Logging;
using LINGYUN.Abp.AspNetCore.HttpOverrides.Forwarded;
using Microsoft.AspNetCore.HttpOverrides;
using Volo.Abp.Security.Claims;
using System.Collections.Generic;
using IdentityModel;
using System.Security.Claims;
namespace LY.MicroService.IdentityServer;
@ -270,6 +274,14 @@ public partial class IdentityServerHttpApiHostModule
}
}
private void ConfigureIdentity()
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureSwagger(IServiceCollection services)
{
// Swagger
@ -364,6 +376,7 @@ public partial class IdentityServerHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.MapInboundClaims = false;
});
if (isDevelopment)

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

@ -1,3 +1,4 @@
using AutoMapper.Internal;
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
@ -16,6 +17,8 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using System.Linq;
using Volo.Abp;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.MultiTenancy;
@ -26,7 +29,9 @@ using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.Security.Claims;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.Users;
namespace LY.MicroService.IdentityServer;
@ -50,7 +55,7 @@ namespace LY.MicroService.IdentityServer;
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpLocalizationManagementEntityFrameworkCoreModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
//typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpAuthorizationOrganizationUnitsModule),
typeof(AbpAuditLoggingElasticsearchModule),
typeof(AbpEmailingExceptionHandlingModule),
@ -81,6 +86,7 @@ public partial class IdentityServerHttpApiHostModule : AbpModule
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureIdentity();
ConfigureDbContext();
ConfigureLocalization();
ConfigreExceptionHandling();
@ -112,9 +118,7 @@ public partial class IdentityServerHttpApiHostModule : AbpModule
app.UseCors(DefaultCorsPolicyName);
// 认证
app.UseAuthentication();
app.UseAbpClaimsMap();
// jwt
app.UseJwtTokenMiddleware();
app.UseDynamicClaims();
// 多租户
app.UseMultiTenancy();
// 本地化

6
aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/appsettings.Development.json

@ -70,7 +70,7 @@
"HostName": "127.0.0.1",
"Port": 5672,
"UserName": "admin",
"Password": "admin",
"Password": "123456",
"ExchangeName": "LINGYUN.Abp.Application",
"VirtualHost": "/"
}
@ -101,8 +101,8 @@
"MinimumLevel": {
"Default": "Debug",
"Override": {
"System": "Warning",
"Microsoft": "Warning",
"System": "Debug",
"Microsoft": "Debug",
"DotNetCore": "Debug"
}
},

7
aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.Configure.cs

@ -1,4 +1,5 @@
using DotNetCore.CAP;
using IdentityModel;
using LINGYUN.Abp.Account;
using LINGYUN.Abp.AspNetCore.HttpOverrides.Forwarded;
using LINGYUN.Abp.IdentityServer.IdentityResources;
@ -39,6 +40,7 @@ using Volo.Abp.Json;
using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims;
using Volo.Abp.Threading;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.VirtualFileSystem;
@ -206,6 +208,11 @@ public partial class IdentityServerModule
identityConfiguration.Bind(options);
}
});
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureVirtualFileSystem()
{

5
aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.cs

@ -75,7 +75,7 @@ namespace LY.MicroService.IdentityServer;
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(IdentityServerMigrationsEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
//typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpAuditLoggingElasticsearchModule), // 放在 AbpIdentity 模块之后,避免被覆盖
typeof(AbpAspNetCoreHttpOverridesModule),
typeof(AbpLocalizationCultureMapModule),
@ -145,12 +145,11 @@ public partial class IdentityServerModule : AbpModule
app.UseStaticFiles();
app.UseRouting();
app.UseCors(DefaultCorsPolicyName);
app.UseWeChatSignature();
app.UseAuthentication();
app.UseJwtTokenMiddleware();
app.UseMultiTenancy();
app.UseMapRequestLocalization();
app.UseIdentityServer();
app.UseDynamicClaims();
app.UseAuthorization();
app.UseAuditing();
app.UseAbpSerilogEnrichers();

6
aspnet-core/services/LY.MicroService.IdentityServer/appsettings.Development.json

@ -70,7 +70,7 @@
"HostName": "127.0.0.1",
"Port": 5672,
"UserName": "admin",
"Password": "admin",
"Password": "123456",
"ExchangeName": "LINGYUN.Abp.Application",
"VirtualHost": "/"
}
@ -131,8 +131,8 @@
"MinimumLevel": {
"Default": "Debug",
"Override": {
"System": "Warning",
"Microsoft": "Warning",
"System": "Debug",
"Microsoft": "Debug",
"DotNetCore": "Debug"
}
},

1818
aspnet-core/services/LY.MicroService.IdentityServer/package-lock.json

File diff suppressed because it is too large

5232
aspnet-core/services/LY.MicroService.IdentityServer/yarn.lock

File diff suppressed because it is too large

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

@ -34,6 +34,7 @@ using LINGYUN.Abp.LocalizationManagement.Localization;
using Microsoft.IdentityModel.Logging;
using LINGYUN.Abp.AspNetCore.HttpOverrides.Forwarded;
using Microsoft.AspNetCore.HttpOverrides;
using Volo.Abp.Security.Claims;
namespace LY.MicroService.LocalizationManagement;
@ -210,6 +211,14 @@ public partial class LocalizationManagementHttpApiHostModule
});
}
private void ConfigureIdentity()
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureSwagger(IServiceCollection services)
{
// Swagger
@ -298,6 +307,7 @@ public partial class LocalizationManagementHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.MapInboundClaims = false;
});
if (isDevelopment)

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

@ -74,6 +74,7 @@ namespace LY.MicroService.LocalizationManagement
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureIdentity();
ConfigureDbContext();
ConfigureLocalization();
ConfigreExceptionHandling();

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

@ -38,6 +38,7 @@ using Volo.Abp.Json;
using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
@ -260,6 +261,14 @@ public partial class PlatformManagementHttpApiHostModule
}
}
private void ConfigureIdentity()
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureSwagger(IServiceCollection services)
{
// Swagger
@ -348,6 +357,7 @@ public partial class PlatformManagementHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.MapInboundClaims = false;
options.Events = new JwtBearerEvents
{
OnMessageReceived = context =>

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

@ -111,6 +111,7 @@ public partial class PlatformManagementHttpApiHostModule : AbpModule
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureIdentity();
ConfigureDbContext();
ConfigureBlobStoring();
ConfigureLocalization();

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

@ -42,6 +42,7 @@ using LINGYUN.Abp.Notifications.Localization;
using Microsoft.IdentityModel.Logging;
using LINGYUN.Abp.AspNetCore.HttpOverrides.Forwarded;
using Microsoft.AspNetCore.HttpOverrides;
using Volo.Abp.Security.Claims;
namespace LY.MicroService.RealtimeMessage;
@ -301,6 +302,14 @@ public partial class RealtimeMessageHttpApiHostModule
}
}
private void ConfigureIdentity()
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureSwagger(IServiceCollection services)
{
// Swagger
@ -395,6 +404,7 @@ public partial class RealtimeMessageHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.MapInboundClaims = false;
options.Events = new JwtBearerEvents
{
OnMessageReceived = context =>

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

@ -126,6 +126,7 @@ public partial class RealtimeMessageHttpApiHostModule : AbpModule
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureIdentity();
ConfigureDbContext();
ConfigureLocalization();
ConfigureNotifications();

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

@ -34,6 +34,7 @@ using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Quartz;
using Volo.Abp.Security.Claims;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
@ -263,6 +264,14 @@ public partial class TaskManagementHttpApiHostModule
}
}
private void ConfigureIdentity()
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureSwagger(IServiceCollection services)
{
// Swagger
@ -327,6 +336,7 @@ public partial class TaskManagementHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.MapInboundClaims = false;
});
if (isDevelopment)

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

@ -98,6 +98,7 @@ public partial class TaskManagementHttpApiHostModule : AbpModule
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureIdentity();
ConfigureDbContext();
ConfigureLocalization();
ConfigureBackgroundTasks();
@ -124,7 +125,7 @@ public partial class TaskManagementHttpApiHostModule : AbpModule
app.UseRouting();
app.UseCors();
app.UseAuthentication();
app.UseJwtTokenMiddleware();
app.UseDynamicClaims();
app.UseMultiTenancy();
app.UseAbpRequestLocalization();
app.UseAuthorization();

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

@ -41,6 +41,7 @@ using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Quartz;
using Volo.Abp.Security.Claims;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
@ -315,6 +316,14 @@ public partial class WebhooksManagementHttpApiHostModule
}
}
private void ConfigureIdentity()
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureSwagger(IServiceCollection services)
{
// Swagger
@ -400,6 +409,7 @@ public partial class WebhooksManagementHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.MapInboundClaims = false;
});
if (isDevelopment)

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

@ -99,6 +99,7 @@ public partial class WebhooksManagementHttpApiHostModule : AbpModule
var configuration = context.Services.GetConfiguration();
ConfigureWrapper();
ConfigureIdentity();
ConfigureDbContext();
ConfigureLocalization();
ConfigureExceptionHandling();
@ -128,10 +129,7 @@ public partial class WebhooksManagementHttpApiHostModule : AbpModule
app.UseRouting();
app.UseCors();
app.UseAuthentication();
// IDS与JWT不匹配可能造成鉴权错误
// TODO: abp在某个更新版本建议移除此中间价
app.UseAbpClaimsMap();
app.UseJwtTokenMiddleware();
app.UseDynamicClaims();
app.UseMultiTenancy();
app.UseMapRequestLocalization();
app.UseAuthorization();

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

@ -43,6 +43,7 @@ using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Quartz;
using Volo.Abp.Security.Claims;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
@ -352,6 +353,14 @@ public partial class WorkflowManagementHttpApiHostModule
}
}
private void ConfigureIdentity()
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureSwagger(IServiceCollection services)
{
// Swagger
@ -422,6 +431,7 @@ public partial class WorkflowManagementHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.MapInboundClaims = false;
});
//services.AddElsaJwtBearerAuthentication(options =>

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

@ -102,6 +102,7 @@ public partial class WorkflowManagementHttpApiHostModule : AbpModule
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureIdentity();
ConfigureDbContext();
ConfigureLocalization();
ConfigureBackgroundTasks();
@ -135,10 +136,7 @@ public partial class WorkflowManagementHttpApiHostModule : AbpModule
app.UseCors(DefaultCorsPolicyName);
app.UseElsaFeatures();
app.UseAuthentication();
// IDS与JWT不匹配可能造成鉴权错误
// TODO: abp在某个更新版本建议移除此中间价
app.UseAbpClaimsMap();
app.UseJwtTokenMiddleware();
app.UseDynamicClaims();
app.UseMultiTenancy();
app.UseAuthorization();
app.UseSwagger();

13
aspnet-core/templates/content/.template.config/template.json

@ -1,14 +1,15 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "colin.in@foxmail.com",
"classifications": [ "micro", "webapi", "cloud" ],
"classifications": ["micro", "webapi", "cloud"],
"name": "LINGYUN.Abp.MicroService",
"identity": "LINGYUN.Abp.MicroService", //
"groupIdentity": "LINGYUN.Abp.Application",
"identity": "LINGYUN.Abp.MicroService",
"description": "Abp framework micro-service template",
"groupIdentity": "LINGYUN.Abp.Application",
"shortName": "lam",
"tags": {
"language": "C#",
"type": "project"
"language": "C#",
"type": "project"
},
"sourceName": "ProjectName",
"preferNameDirectory": true,
@ -96,4 +97,4 @@
"value": "(AuthenticationScheme == \"OpenIddict\")"
}
}
}
}

5
aspnet-core/templates/content/.template.config/template.zh-Hans.json

@ -0,0 +1,5 @@
{
"description": "适用于abp框架的微服务模板项目",
"symbols/AuthenticationScheme/description": "认证服务体系, 可选项为: IdentityServer4、OpenIddict, 默认使用IdentityServer4.",
"symbols/DatabaseManagement/description": "数据库管理提供者, 可选项为: SqlServer、MySQL、Sqlite、Oracle、OracleDevart、PostgreSql, 默认使用MySQL."
}

4
aspnet-core/templates/content/Directory.Build.props

@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<VoloAbpPackageVersion>8.0.0</VoloAbpPackageVersion>
<VoloAbpPackageVersion>8.0.3</VoloAbpPackageVersion>
<VoloAbpLeptonXThemePackageVersion>3.0.0</VoloAbpLeptonXThemePackageVersion>
<LINGYUNAbpPackageVersion>8.0.0</LINGYUNAbpPackageVersion>
<LINGYUNAbpPackageVersion>8.0.3</LINGYUNAbpPackageVersion>
<DaprPackageVersion>1.12.0</DaprPackageVersion>
<DistributedLockRedisPackageVersion>1.0.2</DistributedLockRedisPackageVersion>
<DotNetCoreCAPPackageVersion>8.0.0</DotNetCoreCAPPackageVersion>

10
aspnet-core/templates/content/common.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>8.0.0</Version>
<Version>8.0.3</Version>
<Authors>colin</Authors>
<NoWarn>$(NoWarn);CS1591;CS0436;CS8618;NU1803</NoWarn>
<PackageProjectUrl>https://github.com/colinin/abp-next-admin</PackageProjectUrl>
@ -9,6 +9,9 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/colinin/abp-next-admin</RepositoryUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
</PropertyGroup>
<ItemGroup>
@ -29,6 +32,11 @@
<None Remove="Modules\**" />
</ItemGroup>
<ItemGroup>
<Content Include="**\*" Exclude="bin\**;obj\**" />
<Compile Remove="**\*" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>$(SolutionDir)LocalNuget</OutputPath>
</PropertyGroup>

1
aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/PackageName.CompanyName.ProjectName.HttpApi.Host.csproj

@ -25,7 +25,6 @@
<PackageReference Include="LINGYUN.Abp.Data.DbMigrator" Version="$(LINGYUNAbpPackageVersion)" />
<PackageReference Include="LINGYUN.Abp.Serilog.Enrichers.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageReference Include="LINGYUN.Abp.Serilog.Enrichers.UniqueId" Version="$(LINGYUNAbpPackageVersion)" />
<PackageReference Include="LINGYUN.Abp.MultiTenancy" Version="$(LINGYUNAbpPackageVersion)" />
<PackageReference Include="LINGYUN.Abp.Localization.CultureMap" Version="$(LINGYUNAbpPackageVersion)" />
<PackageReference Include="LINGYUN.Abp.AspNetCore.Mvc.Localization" Version="$(LINGYUNAbpPackageVersion)" />
<PackageReference Include="LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />

12
aspnet-core/templates/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbMigrationEventHandler.cs

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.EntityFrameworkCore.Migrations;
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
public class ProjectNameDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase<ProjectNameDbContext>
{
}

2
common.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>8.0.0</Version>
<Version>8.0.4</Version>
<Authors>colin</Authors>
<NoWarn>$(NoWarn);CS1591;CS0436;CS8618;NU1803</NoWarn>
<PackageProjectUrl>https://github.com/colinin/abp-next-admin</PackageProjectUrl>

4
gateways/Directory.Build.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<VoloAbpPackageVersion>8.0.3</VoloAbpPackageVersion>
<LINGYUNAbpPackageVersion>8.0.3</LINGYUNAbpPackageVersion>
<VoloAbpPackageVersion>8.0.4</VoloAbpPackageVersion>
<LINGYUNAbpPackageVersion>8.0.4</LINGYUNAbpPackageVersion>
<DaprPackageVersion>1.12.0</DaprPackageVersion>
<DotNetCoreCAPPackageVersion>8.0.0</DotNetCoreCAPPackageVersion>
<AliyunSDKPackageVersion>1.5.10</AliyunSDKPackageVersion>

2
gateways/common.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>8.0.3</Version>
<Version>8.0.4</Version>
<Authors>colin</Authors>
<NoWarn>$(NoWarn);CS1591;CS0436;CS8618;NU1803</NoWarn>
<PackageProjectUrl>https://github.com/colinin/abp-next-admin</PackageProjectUrl>

Loading…
Cancel
Save