Browse Source

Merge pull request #979 from colinin/fix-identity-session

fix(session): fix some issues caused by user session design.
pull/988/head
yx lin 1 year ago
committed by GitHub
parent
commit
2c392597de
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      Directory.Packages.props
  2. 43
      apps/vue/src/api/caching-management/cache/index.ts
  3. 6
      apps/vue/src/api/logging/logs/index.ts
  4. 71
      apps/vue/src/api/openiddict/open-iddict-application/index.ts
  5. 44
      apps/vue/src/api/openiddict/open-iddict-authorization/index.ts
  6. 71
      apps/vue/src/api/openiddict/open-iddict-scope/index.ts
  7. 44
      apps/vue/src/api/openiddict/open-iddict-token/index.ts
  8. 6
      apps/vue/src/api/permission-management/permissions/index.ts
  9. 93
      apps/vue/src/api/platform/package/index.ts
  10. 1
      apps/vue/src/api/platform/package/model/index.ts
  11. 86
      apps/vue/src/api/platform/user-favorites-menu/index.ts
  12. 53
      apps/vue/src/api/saas/edition/index.ts
  13. 105
      apps/vue/src/api/saas/tenant/index.ts
  14. 14
      apps/vue/src/api/sys/menu.ts
  15. 6
      apps/vue/src/api/sys/theme.ts
  16. 36
      apps/vue/src/api/text-templating/contents/index.ts
  17. 53
      apps/vue/src/api/text-templating/definitions/index.ts
  18. 14
      apps/vue/src/api/webhooks/send-attempts/index.ts
  19. 16
      apps/vue/src/api/webhooks/subscriptions/index.ts
  20. 62
      apps/vue/src/hooks/abp/useNotificationSerializer.ts
  21. 42
      apps/vue/src/layouts/default/header/components/notify/index.vue
  22. 56
      apps/vue/src/layouts/default/header/components/notify/useNotifications.ts
  23. 11
      apps/vue/src/store/modules/user.ts
  24. 7
      apps/vue/src/views/messages/notifications/components/NotificationTable.vue
  25. 88
      aspnet-core/framework/common/LINGYUN.Abp.AspNetCore.Wrapper/LINGYUN/Abp/AspNetCore/Wrapper/AbpExceptionHandlingWrapperMiddleware.cs
  26. 9
      aspnet-core/framework/mvc/LINGYUN.Abp.AspNetCore.Mvc.Wrapper/LINGYUN/Abp/AspNetCore/Mvc/Wrapper/AbpAspNetCoreMvcWrapperModule.cs
  27. 3
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionClaimsPrincipalContributor.cs
  28. 2
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Notifications/LINGYUN/Abp/Identity/Notifications/IdentitySessionRevokeEventHandler.cs
  29. 13
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/AbpSessionMiddleware.cs
  30. 6
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/UserFavoriteMenuController.cs
  31. 17
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/SignalRNotificationPublishProvider.cs
  32. 3
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs
  33. 1
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj
  34. 2
      aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs
  35. 1
      aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj
  36. 1
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs
  37. 1
      aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs
  38. 1
      aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/LY.MicroService.identityServer.HttpApi.Host.csproj
  39. 2
      aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.cs
  40. 1
      aspnet-core/services/LY.MicroService.IdentityServer/LY.MicroService.IdentityServer.csproj
  41. 12
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs
  42. 1
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj
  43. 2
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs
  44. 2
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs
  45. 4
      build/build-aspnetcore-common.ps1
  46. 42
      docker-compose.override.configuration.yml
  47. 42
      docker-compose.yml
  48. 29
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/InternalGatewayModule.cs
  49. 1
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/LINGYUN.MicroService.Internal.Gateway.csproj
  50. 2
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/Properties/launchSettings.json
  51. 12
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/appsettings.Development.json
  52. 194
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/yarp.json

1
Directory.Packages.props

@ -252,5 +252,6 @@
<PackageVersion Include="Tencent.QCloud.Cos.Sdk" Version="5.4.37" />
<PackageVersion Include="TencentCloudSDK" Version="3.0.712" />
<PackageVersion Include="Yarp.ReverseProxy" Version="2.1.0" />
<PackageVersion Include="Yarp.Telemetry.Consumption" Version="2.1.0" />
</ItemGroup>
</Project>

43
apps/vue/src/api/caching-management/cache/index.ts

@ -1,4 +1,4 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
CacheKeys,
CacheValue,
@ -6,51 +6,28 @@ import {
GetCacheKeysRequest,
} from './model';
const remoteServiceName = 'CachingManagement';
const controllerName = 'Cache';
export const getKeys = (input: GetCacheKeysRequest) => {
return defAbpHttp.request<CacheKeys>({
service: remoteServiceName,
controller: controllerName,
action: 'GetKeysAsync',
params: {
input: input,
},
return defHttp.get<CacheKeys>({
url: '/api/caching-management/cache',
params: input,
});
};
export const getValue = (key: string) => {
return defAbpHttp.request<CacheValue>({
service: remoteServiceName,
controller: controllerName,
action: 'GetValueAsync',
params: {
input: {
key: key,
}
},
return defHttp.get<CacheValue>({
url: `/api/caching-management/cache?key=${key}`,
});
};
export const refresh = (input: CacheRefreshRequest) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'RefreshAsync',
return defHttp.put<void>({
url: `/api/caching-management/cache/refresh`,
data: input,
});
};
export const remove = (key: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'RemoveAsync',
params: {
input: {
key: key,
}
},
return defHttp.delete<void>({
url: `/api/caching-management/cache?key=${key}`,
});
};

6
apps/vue/src/api/logging/logs/index.ts

@ -1,14 +1,14 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { Log, GetLogPagedRequest } from './model';
export const get = (id: string) => {
return defAbpHttp.get<Log>({
return defHttp.get<Log>({
url: `/api/auditing/logging/${id}`,
});
};
export const getList = (input: GetLogPagedRequest) => {
return defAbpHttp.get<PagedResultDto<Log>>({
return defHttp.get<PagedResultDto<Log>>({
url: '/api/auditing/logging',
params: input,
});

71
apps/vue/src/api/openiddict/open-iddict-application/index.ts

@ -1,4 +1,4 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
OpenIddictApplicationDto,
OpenIddictApplicationGetListInput,
@ -6,94 +6,35 @@ import {
OpenIddictApplicationUpdateDto,
} from './model';
// export const GetAsyncById = (id: string) => {
// return defAbpHttp.request<OpenIddictApplicationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetAsync',
// uniqueName: 'GetAsyncById',
// params: {
// id: id,
// },
// });
// };
export const get = (id: string) => {
return defAbpHttp.get<OpenIddictApplicationDto>({
return defHttp.get<OpenIddictApplicationDto>({
url: `/api/openiddict/applications/${id}`,
});
};
// export const GetListAsyncByInput = (input: OpenIddictApplicationGetListInput) => {
// return defAbpHttp.pagedRequest<OpenIddictApplicationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetListAsync',
// uniqueName: 'GetListAsyncByInput',
// params: {
// input: input,
// },
// });
// };
export const getList = (input: OpenIddictApplicationGetListInput) => {
return defAbpHttp.get<PagedResultDto<OpenIddictApplicationDto>>({
return defHttp.get<PagedResultDto<OpenIddictApplicationDto>>({
url: '/api/openiddict/applications',
params: input,
});
};
// export const CreateAsyncByInput = (input: OpenIddictApplicationCreateDto) => {
// return defAbpHttp.request<OpenIddictApplicationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'CreateAsync',
// uniqueName: 'CreateAsyncByInput',
// data: input,
// });
// };
export const create = (input: OpenIddictApplicationCreateDto) => {
return defAbpHttp.post<OpenIddictApplicationDto>({
return defHttp.post<OpenIddictApplicationDto>({
url: '/api/openiddict/applications',
data: input,
});
};
// export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictApplicationUpdateDto) => {
// return defAbpHttp.request<OpenIddictApplicationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'UpdateAsync',
// uniqueName: 'UpdateAsyncByIdAndInput',
// params: {
// id: id,
// },
// data: input,
// });
// };
export const update = (id: string, input: OpenIddictApplicationUpdateDto) => {
return defAbpHttp.put<OpenIddictApplicationDto>({
return defHttp.put<OpenIddictApplicationDto>({
url: `/api/openiddict/applications/${id}`,
data: input,
});
};
// export const DeleteAsyncById = (id: string) => {
// return defAbpHttp.request<void>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'DeleteAsync',
// uniqueName: 'DeleteAsyncById',
// params: {
// id: id,
// },
// });
// };
export const deleteById = (id: string) => {
return defAbpHttp.delete<void>({
return defHttp.delete<void>({
url: `/api/openiddict/applications/${id}`,
});
};

44
apps/vue/src/api/openiddict/open-iddict-authorization/index.ts

@ -1,56 +1,20 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { OpenIddictAuthorizationDto, OpenIddictAuthorizationGetListInput, } from './model';
// export const DeleteAsyncById = (id: string) => {
// return defAbpHttp.request<void>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'DeleteAsync',
// uniqueName: 'DeleteAsyncById',
// params: {
// id: id,
// },
// });
// };
export const deleteById = (id: string) => {
return defAbpHttp.delete<void>({
return defHttp.delete<void>({
url: `/api/openiddict/authorizations/${id}`,
});
};
// export const GetAsyncById = (id: string) => {
// return defAbpHttp.request<OpenIddictAuthorizationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetAsync',
// uniqueName: 'GetAsyncById',
// params: {
// id: id,
// },
// });
// };
export const get = (id: string) => {
return defAbpHttp.get<OpenIddictAuthorizationDto>({
return defHttp.get<OpenIddictAuthorizationDto>({
url: `/api/openiddict/authorizations/${id}`,
});
};
// export const GetListAsyncByInput = (input: OpenIddictAuthorizationGetListInput) => {
// return defAbpHttp.pagedRequest<OpenIddictAuthorizationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetListAsync',
// uniqueName: 'GetListAsyncByInput',
// params: {
// input: input,
// },
// });
// };
export const getList = (input: OpenIddictAuthorizationGetListInput) => {
return defAbpHttp.get<PagedResultDto<OpenIddictAuthorizationDto>>({
return defHttp.get<PagedResultDto<OpenIddictAuthorizationDto>>({
url: '/api/openiddict/authorizations',
params: input,
});

71
apps/vue/src/api/openiddict/open-iddict-scope/index.ts

@ -1,4 +1,4 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
OpenIddictScopeCreateDto,
OpenIddictScopeDto,
@ -6,93 +6,34 @@ import {
OpenIddictScopeUpdateDto,
} from './model';
// export const CreateAsyncByInput = (input: OpenIddictScopeCreateDto) => {
// return defAbpHttp.request<OpenIddictScopeDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'CreateAsync',
// uniqueName: 'CreateAsyncByInput',
// data: input,
// });
// };
export const create = (input: OpenIddictScopeCreateDto) => {
return defAbpHttp.post<OpenIddictScopeDto>({
return defHttp.post<OpenIddictScopeDto>({
url: '/api/openiddict/scopes',
data: input,
});
};
// export const DeleteAsyncById = (id: string) => {
// return defAbpHttp.request<void>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'DeleteAsync',
// uniqueName: 'DeleteAsyncById',
// params: {
// id: id,
// },
// });
// };
export const deleteById = (id: string) => {
return defAbpHttp.delete<void>({
return defHttp.delete<void>({
url: `/api/openiddict/scopes/${id}`
});
};
// export const GetAsyncById = (id: string) => {
// return defAbpHttp.request<OpenIddictScopeDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetAsync',
// uniqueName: 'GetAsyncById',
// params: {
// id: id,
// },
// });
// };
export const get = (id: string) => {
return defAbpHttp.get<OpenIddictScopeDto>({
return defHttp.get<OpenIddictScopeDto>({
url: `/api/openiddict/scopes/${id}`
});
};
// export const GetListAsyncByInput = (input: OpenIddictScopeGetListInput) => {
// return defAbpHttp.pagedRequest<OpenIddictScopeDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetListAsync',
// uniqueName: 'GetListAsyncByInput',
// params: {
// input: input,
// },
// });
// };
export const getList = (input: OpenIddictScopeGetListInput) => {
return defAbpHttp.get<PagedResultDto<OpenIddictScopeDto>>({
return defHttp.get<PagedResultDto<OpenIddictScopeDto>>({
url: '/api/openiddict/scopes',
params: input,
});
};
// export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictScopeUpdateDto) => {
// return defAbpHttp.request<OpenIddictScopeDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'UpdateAsync',
// uniqueName: 'UpdateAsyncByIdAndInput',
// params: {
// id: id,
// },
// data: input,
// });
// };
export const update = (id: string, input: OpenIddictScopeUpdateDto) => {
return defAbpHttp.put<OpenIddictScopeDto>({
return defHttp.put<OpenIddictScopeDto>({
url: `/api/openiddict/scopes/${id}`,
data: input,
});

44
apps/vue/src/api/openiddict/open-iddict-token/index.ts

@ -1,56 +1,20 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { OpenIddictTokenDto, OpenIddictTokenGetListInput, } from './model';
// export const DeleteAsyncById = (id: string) => {
// return defAbpHttp.request<void>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'DeleteAsync',
// uniqueName: 'DeleteAsyncById',
// params: {
// id: id,
// },
// });
// };
export const deleteById = (id: string) => {
return defAbpHttp.delete<void>({
return defHttp.delete<void>({
url: `/api/openiddict/tokens/${id}`,
});
};
// export const GetAsyncById = (id: string) => {
// return defAbpHttp.request<OpenIddictTokenDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetAsync',
// uniqueName: 'GetAsyncById',
// params: {
// id: id,
// },
// });
// };
export const get = (id: string) => {
return defAbpHttp.get<OpenIddictTokenDto>({
return defHttp.get<OpenIddictTokenDto>({
url: `/api/openiddict/tokens/${id}`,
});
};
// export const GetListAsyncByInput = (input: OpenIddictTokenGetListInput) => {
// return defAbpHttp.pagedRequest<OpenIddictTokenDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetListAsync',
// uniqueName: 'GetListAsyncByInput',
// params: {
// input: input,
// },
// });
// };
export const getList = (input: OpenIddictTokenGetListInput) => {
return defAbpHttp.get<PagedResultDto<OpenIddictTokenDto>>({
return defHttp.get<PagedResultDto<OpenIddictTokenDto>>({
url: '/api/openiddict/tokens',
params: input,
});

6
apps/vue/src/api/permission-management/permissions/index.ts

@ -1,15 +1,15 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { PermissionProvider, PermissionResult, UpdatePermissions } from './model';
export const get = (provider: PermissionProvider) => {
return defAbpHttp.get<PermissionResult>({
return defHttp.get<PermissionResult>({
url: '/api/permission-management/permissions',
params: provider,
});
};
export const update = (provider: PermissionProvider, input: UpdatePermissions) => {
return defAbpHttp.put<void>({
return defHttp.put<void>({
url: '/api/permission-management/permissions',
data: input,
params: provider,

93
apps/vue/src/api/platform/package/index.ts

@ -1,4 +1,4 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
PackageCreateDto,
PackageDto,
@ -11,111 +11,58 @@ import {
PackageUpdateDto
} from './model';
const remoteServiceName = 'Platform';
const controllerName = 'Package';
export const CreateAsyncByInput = (input: PackageCreateDto) => {
return defAbpHttp.request<PackageDto>({
service: remoteServiceName,
controller: controllerName,
action: 'CreateAsync',
uniqueName: 'CreateAsyncByInput',
params: {
},
return defHttp.post<PackageDto>({
url: `/api/platform/packages`,
data: input,
});
};
export const DeleteAsyncById = (id: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteAsync',
uniqueName: 'DeleteAsyncById',
params: {
id: id,
},
return defHttp.delete<void>({
url: `/api/platform/packages/${id}`,
});
};
export const UploadBlobAsyncByIdAndInput = (id: string, input: PackageBlobUploadDto) => {
return defAbpHttp.request<PackageBlobDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UploadBlobAsync',
uniqueName: 'UploadBlobAsyncByIdAndInput',
params: id,
return defHttp.post<PackageBlobDto>({
url: `/api/platform/packages/${id}/blob`,
data: input,
});
};
export const RemoveBlobAsyncByIdAndInput = (id: string, input: PackageBlobRemoveDto) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'RemoveBlobAsync',
uniqueName: 'RemoveBlobAsyncByIdAndInput',
params: {
id: id,
input: input,
},
return defHttp.delete<void>({
url: `/api/platform/packages/${id}/blob?name=${input.name}`,
});
};
export const DownloadBlobAsyncByIdAndInput = (id: string, input: PackageBlobDownloadInput) => {
return defAbpHttp.request<Blob>({
service: remoteServiceName,
controller: controllerName,
action: 'DownloadBlobAsync',
uniqueName: 'DownloadBlobAsyncByIdAndInput',
params: {
id: id,
input: input,
},
return defHttp.get<Blob>({
url: `/api/platform/packages/${id}/blob?name=${input.name}`,
},{
withToken: false,
});
};
export const GetAsyncById = (id: string) => {
return defAbpHttp.request<PackageDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncById',
params: {
id: id,
},
return defHttp.get<PackageDto>({
url: `/api/platform/packages/${id}`,
},{
withToken: false,
});
};
export const GetLatestAsyncByInput = (input: PackageGetLatestInput) => {
return defAbpHttp.request<PackageDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetLatestAsync',
uniqueName: 'GetLatestAsyncByInput',
params: {
input: input,
},
return defHttp.get<PackageDto>({
url: `/api/platform/packages/${input.name}/latest/${input.version}`,
},{
withToken: false,
});
};
export const GetListAsyncByInput = (input: PackageGetPagedListInput) => {
return defAbpHttp.pagedRequest<PackageDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetListAsync',
uniqueName: 'GetListAsyncByInput',
params: {
input: input,
},
return defHttp.get<PagedResultDto<PackageDto>>({
url: `/api/platform/packages`,
params: input,
});
};
export const UpdateAsyncByIdAndInput = (id: string, input: PackageUpdateDto) => {
return defAbpHttp.request<PackageDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UpdateAsync',
uniqueName: 'UpdateAsyncByIdAndInput',
params: id,
return defHttp.put<PackageDto>({
url: `/api/platform/packages/${id}`,
data: input,
});
};

1
apps/vue/src/api/platform/package/model/index.ts

@ -25,6 +25,7 @@ export interface PackageBlobDownloadInput {
export interface PackageGetLatestInput {
name: string;
version: string;
}
export interface PackageGetPagedListInput extends PagedAndSortedResultRequestDto {

86
apps/vue/src/api/platform/user-favorites-menu/index.ts

@ -1,104 +1,56 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { UserFavoriteMenuDto, UserFavoriteMenuCreateDto, UserFavoriteMenuUpdateDto } from './model';
const remoteService = {
name: 'Platform',
controller: 'UserFavoriteMenu',
replace: {
framework: 'Vue Vben Admin',
}
};
export const create = (userId: string, input: UserFavoriteMenuCreateDto) => {
input.framework = remoteService.replace.framework;
return defAbpHttp.request<UserFavoriteMenuDto>({
service: remoteService.name,
controller: remoteService.controller,
action: 'CreateAsync',
params: {
userId: userId,
},
input.framework = 'Vue Vben Admin';
return defHttp.post<UserFavoriteMenuDto>({
url: `/api/platform/menus/favorites/${userId}`,
data: input,
});
};
export const createMyFavoriteMenu = (input: UserFavoriteMenuCreateDto) => {
input.framework = remoteService.replace.framework;
return defAbpHttp.request<UserFavoriteMenuDto>({
service: remoteService.name,
controller: remoteService.controller,
action: 'CreateMyFavoriteMenuAsync',
input.framework = 'Vue Vben Admin';
return defHttp.post<UserFavoriteMenuDto>({
url: `/api/platform/menus/favorites/my-favorite-menus`,
data: input,
});
};
export const del = (userId: string, menuId: string) => {
return defAbpHttp.request<void>({
service: remoteService.name,
controller: remoteService.controller,
action: 'DeleteAsync',
params: {
userId: userId,
input: {
MenuId: menuId,
},
},
return defHttp.delete<void>({
url: `/api/platform/menus/favorites/${userId}/${menuId}`,
});
};
export const delMyFavoriteMenu = (menuId: string) => {
return defAbpHttp.request<void>({
service: remoteService.name,
controller: remoteService.controller,
action: 'DeleteMyFavoriteMenuAsync',
params: {
input: {
MenuId: menuId,
},
},
return defHttp.delete<void>({
url: `/api/platform/menus/favorites/my-favorite-menus/${menuId}`,
});
};
export const update = (userId: string, input: UserFavoriteMenuUpdateDto) => {
return defAbpHttp.request<UserFavoriteMenuDto>({
service: remoteService.name,
controller: remoteService.controller,
action: 'UpdateAsync',
params: {
userId: userId,
},
return defHttp.put<UserFavoriteMenuDto>({
url: `/api/platform/menus/favorites/${userId}`,
data: input,
});
};
export const updateMyFavoriteMenu = (input: UserFavoriteMenuUpdateDto) => {
return defAbpHttp.request<UserFavoriteMenuDto>({
service: remoteService.name,
controller: remoteService.controller,
action: 'UpdateMyFavoriteMenuAsync',
return defHttp.put<UserFavoriteMenuDto>({
url: `/api/platform/menus/favorites/my-favorite-menus`,
data: input,
});
};
export const getList = (userId: string) => {
return defAbpHttp.listRequest<UserFavoriteMenuDto>({
service: remoteService.name,
controller: remoteService.controller,
action: 'GetListAsync',
params: {
userId: userId,
framework: remoteService.replace.framework,
},
return defHttp.get<ListResultDto<UserFavoriteMenuDto>>({
url: `/api/platform/menus/favorites/${userId}?framework=Vue Vben Admin`,
});
};
export const getMyFavoriteMenuList = () => {
return defAbpHttp.listRequest<UserFavoriteMenuDto>({
service: remoteService.name,
controller: remoteService.controller,
action: 'GetMyFavoriteMenuListAsync',
params: {
framework: remoteService.replace.framework,
},
return defHttp.get<ListResultDto<UserFavoriteMenuDto>>({
url: `/api/platform/menus/favorites/my-favorite-menus?framework=Vue Vben Admin`,
});
};

53
apps/vue/src/api/saas/edition/index.ts

@ -1,64 +1,35 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { EditionCreateDto, EditionDto,EditionGetListInput, EditionUpdateDto, } from './model';
const remoteServiceName = 'AbpSaas';
const controllerName = 'Edition';
export const CreateAsyncByInput = (input: EditionCreateDto) => {
return defAbpHttp.request<EditionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'CreateAsync',
uniqueName: 'CreateAsyncByInput',
return defHttp.post<EditionDto>({
url: `/api/saas/editions`,
data: input,
});
};
export const DeleteAsyncById = (id: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteAsync',
uniqueName: 'DeleteAsyncById',
params: {
id: id,
},
return defHttp.delete<void>({
url: `/api/saas/editions/${id}`,
});
};
export const GetAsyncById = (id: string) => {
return defAbpHttp.request<EditionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncById',
params: {
id: id,
},
return defHttp.get<EditionDto>({
url: `/api/saas/editions/${id}`,
});
};
export const GetListAsyncByInput = (input: EditionGetListInput) => {
return defAbpHttp.pagedRequest<EditionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetListAsync',
uniqueName: 'GetListAsyncByInput',
params: {
input: input,
},
return defHttp.get<PagedResultDto<EditionDto>>({
url: `/api/saas/editions`,
params: input,
});
};
export const UpdateAsyncByIdAndInput = (id: string, input: EditionUpdateDto) => {
return defAbpHttp.request<EditionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UpdateAsync',
uniqueName: 'UpdateAsyncByIdAndInput',
params: {
id: id,
},
return defHttp.put<EditionDto>({
url: `/api/saas/editions/${id}`,
data: input,
});
};

105
apps/vue/src/api/saas/tenant/index.ts

@ -1,127 +1,66 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { TenantDto,TenantGetListInput, TenantCreateDto, TenantUpdateDto, TenantConnectionStringDto,TenantConnectionStringCreateOrUpdate, } from './model';
const remoteServiceName = 'AbpSaas';
const controllerName = 'Tenant';
export const GetAsyncById = (id: string) => {
return defAbpHttp.request<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncById',
params: {
id: id,
},
return defHttp.get<TenantDto>({
url: `/api/saas/tenants/${id}`,
});
};
export const GetAsyncByName = (name: string) => {
return defAbpHttp.request<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncByName',
params: {
name: name,
},
return defHttp.get<TenantDto>({
url: `/api/saas/tenants/by-name/${name}`,
});
};
export const GetListAsyncByInput = (input: TenantGetListInput) => {
return defAbpHttp.pagedRequest<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetListAsync',
uniqueName: 'GetListAsyncByInput',
params: {
input: input,
},
return defHttp.get<PagedResultDto<TenantDto>>({
url: `/api/saas/tenants`,
params: input,
});
};
export const CreateAsyncByInput = (input: TenantCreateDto) => {
return defAbpHttp.request<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'CreateAsync',
uniqueName: 'CreateAsyncByInput',
return defHttp.post<TenantDto>({
url: `/api/saas/tenants`,
data: input,
});
};
export const UpdateAsyncByIdAndInput = (id: string, input: TenantUpdateDto) => {
return defAbpHttp.request<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UpdateAsync',
uniqueName: 'UpdateAsyncByIdAndInput',
params: {
id: id,
},
return defHttp.put<TenantDto>({
url: `/api/saas/tenants/${id}`,
data: input,
});
};
export const DeleteAsyncById = (id: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteAsync',
uniqueName: 'DeleteAsyncById',
params: {
id: id,
},
return defHttp.delete<void>({
url: `/api/saas/tenants/${id}`,
});
};
export const GetConnectionStringAsyncByIdAndName = (id: string, name: string) => {
return defAbpHttp.request<TenantConnectionStringDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetConnectionStringAsync',
uniqueName: 'GetConnectionStringAsyncByIdAndName',
params: {
id: id,
name: name,
},
return defHttp.get<TenantConnectionStringDto>({
url: `/api/saas/tenants/${id}/connection-string/${name}`,
});
};
export const GetConnectionStringAsyncById = (id: string) => {
return defAbpHttp.listRequest<TenantConnectionStringDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetConnectionStringAsync',
uniqueName: 'GetConnectionStringAsyncById',
params: {
id: id,
},
return defHttp.get<ListResultDto<TenantConnectionStringDto>>({
url: `/api/saas/tenants/${id}/connection-string`,
});
};
export const SetConnectionStringAsyncByIdAndInput = (id: string, input: TenantConnectionStringCreateOrUpdate) => {
return defAbpHttp.request<TenantConnectionStringDto>({
service: remoteServiceName,
controller: controllerName,
action: 'SetConnectionStringAsync',
uniqueName: 'SetConnectionStringAsyncByIdAndInput',
params: {
id: id,
},
return defHttp.put<TenantConnectionStringDto>({
url: `/api/saas/tenants/${id}/connection-string`,
data: input,
});
};
export const DeleteConnectionStringAsyncByIdAndName = (id: string, name: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteConnectionStringAsync',
uniqueName: 'DeleteConnectionStringAsyncByIdAndName',
params: {
id: id,
name: name,
},
return defHttp.delete<void>({
url: `/api/saas/tenants/${id}/connection-string/${name}`,
});
};

14
apps/vue/src/api/sys/menu.ts

@ -1,4 +1,4 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { RouteItem } from './model/menuModel';
/**
@ -6,15 +6,7 @@ import { RouteItem } from './model/menuModel';
*/
export const getMenuList = () => {
return defAbpHttp.request<ListResultDto<RouteItem>>({
service: 'Platform',
controller: 'Menu',
action: 'GetCurrentUserMenuListAsync',
uniqueName: 'GetCurrentUserMenuListAsyncByInput',
params: {
input: {
framework: 'Vue Vben Admin',
},
},
return defHttp.get<ListResultDto<RouteItem>>({
url: `/api/platform/menus/by-current-user?framework=Vue Vben Admin`,
});
};

6
apps/vue/src/api/sys/theme.ts

@ -1,14 +1,14 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { ThemeSetting } from './model/themeModel';
export const getTheme = () => {
return defAbpHttp.get<ThemeSetting>({
return defHttp.get<ThemeSetting>({
url: '/api/platform/theme/vue-vben-admin',
});
};
export const changeTheme = (themeSetting: ThemeSetting) => {
return defAbpHttp.put<void>({
return defHttp.put<void>({
url: '/api/platform/theme/vue-vben-admin/change',
data: themeSetting,
});

36
apps/vue/src/api/text-templating/contents/index.ts

@ -1,4 +1,4 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
TextTemplateContentDto,
TextTemplateContentGetInput,
@ -6,43 +6,23 @@ import {
TextTemplateContentUpdateDto
} from './model';
const remoteServiceName = 'AbpTextTemplating';
const controllerName = 'TextTemplateContent';
export const GetAsyncByInput = (input: TextTemplateContentGetInput) => {
return defAbpHttp.request<TextTemplateContentDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncByInput',
params: {
input: input,
},
return defHttp.get<TextTemplateContentDto>({
url: `/api/text-templating/templates/content`,
params: input,
});
};
export const RestoreToDefaultAsyncByNameAndInput = (name: string, input: TextTemplateRestoreInput) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'RestoreToDefaultAsync',
uniqueName: 'RestoreToDefaultAsyncByNameAndInput',
params: {
name: name,
},
return defHttp.put<void>({
url: `/api/text-templating/templates/content/${name}/restore-to-default`,
data: input,
});
};
export const UpdateAsyncByNameAndInput = (name: string, input: TextTemplateContentUpdateDto) => {
return defAbpHttp.request<TextTemplateContentDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UpdateAsync',
uniqueName: 'UpdateAsyncByNameAndInput',
params: {
name: name,
},
return defHttp.put<TextTemplateContentDto>({
url: `/api/text-templating/templates/content/${name}`,
data: input,
});
};

53
apps/vue/src/api/text-templating/definitions/index.ts

@ -1,4 +1,4 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
TextTemplateDefinitionDto,
TextTemplateDefinitionCreateDto,
@ -6,64 +6,35 @@ import {
TextTemplateDefinitionGetListInput
} from './model';
const remoteServiceName = 'AbpTextTemplating';
const controllerName = 'TextTemplateDefinition';
export const CreateAsyncByInput = (input: TextTemplateDefinitionCreateDto) => {
return defAbpHttp.request<TextTemplateDefinitionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'CreateAsync',
uniqueName: 'CreateAsyncByInput',
return defHttp.post<TextTemplateDefinitionDto>({
url: `/api/text-templating/template/definitions`,
data: input,
});
};
export const DeleteAsyncByName = (name: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteAsync',
uniqueName: 'DeleteAsyncByName',
params: {
name: name,
},
return defHttp.delete<void>({
url: `/api/text-templating/template/definitions/${name}`,
});
};
export const GetByNameAsyncByName = (name: string) => {
return defAbpHttp.request<TextTemplateDefinitionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetByNameAsync',
uniqueName: 'GetByNameAsyncByName',
params: {
name: name,
},
return defHttp.get<TextTemplateDefinitionDto>({
url: `/api/text-templating/template/definitions/${name}`,
});
};
export const GetListAsyncByInput = (input: TextTemplateDefinitionGetListInput) => {
return defAbpHttp.request<ListResultDto<TextTemplateDefinitionDto>>({
service: remoteServiceName,
controller: controllerName,
action: 'GetListAsync',
uniqueName: 'GetListAsyncByInput',
params: {
input: input,
},
return defHttp.get<ListResultDto<TextTemplateDefinitionDto>>({
url: `/api/text-templating/template/definitions`,
params: input,
});
};
export const UpdateAsyncByNameAndInput = (name: string, input: TextTemplateDefinitionUpdateDto) => {
return defAbpHttp.request<TextTemplateDefinitionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UpdateAsync',
uniqueName: 'UpdateAsyncByNameAndInput',
params: {
name: name,
},
return defHttp.put<TextTemplateDefinitionDto>({
url: `/api/text-templating/template/definitions/${name}`,
data: input,
});
};

14
apps/vue/src/api/webhooks/send-attempts/index.ts

@ -1,4 +1,4 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
WebhookSendAttempt,
WebhookSendAttemptGetListInput,
@ -7,39 +7,39 @@ import {
} from './model';
export const GetAsyncById = (id: string) => {
return defAbpHttp.get<WebhookSendAttempt>({
return defHttp.get<WebhookSendAttempt>({
url: `/api/webhooks/send-attempts/${id}`,
});
};
export const DeleteAsyncById = (id: string) => {
return defAbpHttp.delete<void>({
return defHttp.delete<void>({
url: `/api/webhooks/send-attempts/${id}`,
});
};
export const DeleteManyAsyncByInput = (input: WebhookSendRecordDeleteManyInput) => {
return defAbpHttp.delete<void>({
return defHttp.delete<void>({
url: `/api/webhooks/send-attempts/delete-many`,
data: input,
});
};
export const GetListAsyncByInput = (input: WebhookSendAttemptGetListInput) => {
return defAbpHttp.get<PagedResultDto<WebhookSendAttempt>>({
return defHttp.get<PagedResultDto<WebhookSendAttempt>>({
url: `/api/webhooks/send-attempts`,
params: input,
});
};
export const ResendAsyncById = (id: string) => {
return defAbpHttp.post<void>({
return defHttp.post<void>({
url: `/api/webhooks/send-attempts/${id}/resend`,
});
};
export const ResendManyAsyncByInput = (input: WebhookSendRecordResendManyInput) => {
return defAbpHttp.post<void>({
return defHttp.post<void>({
url: `/api/webhooks/send-attempts/resend-many`,
data: input,
});

16
apps/vue/src/api/webhooks/subscriptions/index.ts

@ -1,4 +1,4 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
WebhookSubscription,
WebhookAvailableGroup,
@ -9,47 +9,47 @@ import {
} from './model';
export const CreateAsyncByInput = (input: CreateWebhookSubscription) => {
return defAbpHttp.post<WebhookSubscription>({
return defHttp.post<WebhookSubscription>({
url: `/api/webhooks/subscriptions`,
data: input,
});
};
export const UpdateAsyncByIdAndInput = (id: string, input: UpdateWebhookSubscription) => {
return defAbpHttp.put<WebhookSubscription>({
return defHttp.put<WebhookSubscription>({
url: `/api/webhooks/subscriptions/${id}`,
data: input,
});
};
export const GetAsyncById = (id: string) => {
return defAbpHttp.get<WebhookSubscription>({
return defHttp.get<WebhookSubscription>({
url: `/api/webhooks/subscriptions/${id}`,
});
};
export const DeleteAsyncById = (id: string) => {
return defAbpHttp.delete<void>({
return defHttp.delete<void>({
url: `/api/webhooks/subscriptions/${id}`,
});
};
export const DeleteManyAsyncByInput = (input: WebhookSubscriptionDeleteManyInput) => {
return defAbpHttp.delete<void>({
return defHttp.delete<void>({
url: `/api/webhooks/subscriptions/delete-many`,
data: input,
});
};
export const GetListAsyncByInput = (input: WebhookSubscriptionGetListInput) => {
return defAbpHttp.get<PagedResultDto<WebhookSubscription>>({
return defHttp.get<PagedResultDto<WebhookSubscription>>({
url: `/api/webhooks/subscriptions`,
params: input,
});
};
export const GetAllAvailableWebhooksAsync = () => {
return defAbpHttp.get<ListResultDto<WebhookAvailableGroup>>({
return defHttp.get<ListResultDto<WebhookAvailableGroup>>({
url: `/api/webhooks/subscriptions/availables`,
});
};

62
apps/vue/src/hooks/abp/useNotificationSerializer.ts

@ -0,0 +1,62 @@
import { useLocalization } from '/@/hooks/abp/useLocalization';
import { NotificationInfo } from '/@/api/messages/notifications/model';
import { NotificationContentType, NotificationLifetime, NotificationSeverity, NotificationType } from '/@/api/realtime/notifications/types';
interface Notification {
name: string;
title: string;
message: string;
description?: string;
creationTime: Date;
lifetime: NotificationLifetime;
type: NotificationType;
severity: NotificationSeverity;
contentType: NotificationContentType;
data: Recordable<string>;
}
export function useNotificationSerializer() {
function deserialize(notificationInfo: NotificationInfo): Notification {
const { data } = notificationInfo;
let title = data.extraProperties.title;
let message = data.extraProperties.message;
let description = data.extraProperties.description;
if (data.extraProperties.L === true || data.extraProperties.L === 'true') {
const { L } = useLocalization(
[data.extraProperties.title.resourceName ?? data.extraProperties.title.ResourceName,
data.extraProperties.message.resourceName ?? data.extraProperties.message.ResourceName,
data.extraProperties.description?.resourceName ?? data.extraProperties.description?.ResourceName ?? "AbpUi"]);
title = L(
data.extraProperties.title.name ?? data.extraProperties.title.Name,
data.extraProperties.title.values ?? data.extraProperties.title.Values,
);
message = L(
data.extraProperties.message.name ?? data.extraProperties.message.Name,
data.extraProperties.message.values ?? data.extraProperties.message.Values,
);
if (description) {
description = L(
data.extraProperties.description.name ?? data.extraProperties.description.Name,
data.extraProperties.description.values ?? data.extraProperties.description.Values,
);
}
}
return {
title,
message,
description,
creationTime: notificationInfo.creationTime,
contentType: notificationInfo.contentType,
lifetime: notificationInfo.lifetime,
severity: notificationInfo.severity,
type: notificationInfo.type,
data: data.extraProperties,
name: notificationInfo.name,
};
};
return {
deserialize,
};
}

42
apps/vue/src/layouts/default/header/components/notify/index.vue

@ -42,15 +42,21 @@
</div>
</template>
<script lang="ts" setup>
import { computed, ref } from 'vue';
import { computed, ref, onMounted, onUnmounted } from 'vue';
import { Button, Drawer, Tabs, Badge } from 'ant-design-vue';
import { BellOutlined } from '@ant-design/icons-vue';
import NoticeList from './NoticeList.vue';
import { useGo } from '/@/hooks/web/usePage';
import { useDesign } from '/@/hooks/web/useDesign';
import { useTasks } from './useTasks';
import { useMessages } from './useMessages';
import { useNotifications } from './useNotifications';
import { useMessage } from '/@/hooks/web/useMessage';
import { useNotificationSerializer } from '/@/hooks/abp/useNotificationSerializer';
import { useAbpStoreWithOut } from '/@/store/modules/abp';
import { useUserStoreWithOut } from '/@/store/modules/user';
import { NotificationInfo } from '/@/api/messages/notifications/model';
import emitter from '/@/utils/eventBus';
import NoticeList from './NoticeList.vue';
const ButtonGroup = Button.Group;
const TabPane = Tabs.TabPane;
@ -59,8 +65,12 @@
const go = useGo();
const open = ref(false);
const { tasksRef } = useTasks();
const { createWarningModal } = useMessage();
const { messageRef, clearMessage } = useMessages();
const { notifierRef, readNotifer } = useNotifications();
const { deserialize } = useNotificationSerializer();
const abpStore = useAbpStoreWithOut();
const userStrore = useUserStoreWithOut();
// const listData = ref(tabListData);
const count = computed(() => {
@ -71,13 +81,34 @@
return count;
});
function registerSessionEvent() {
// , 退
emitter.on('AbpIdentity.Session.Expiration', (notificationInfo: NotificationInfo) => {
const { data } = notificationInfo;
const sessionId = data.extraProperties['SessionId'];
if (sessionId === abpStore.getApplication?.currentUser?.sessionId) {
const { title, message } = deserialize(notificationInfo);
createWarningModal({
title: title,
content: message,
iconType: 'warning',
afterClose: () => {
userStrore.logout(true);
}
});
}
});
}
function unRegisterSessionEvent() {
emitter.off('AbpIdentity.Session.Expiration', () => {});
}
function handleShowMessages() {
console.log('handleShowMessages');
go('/sys/chat?type=chat-message');
}
function handleShowNotifications() {
console.log('handleShowNotifications');
open.value = false;
go('/messages/notifications');
}
@ -86,6 +117,9 @@
console.log('showDrawer');
open.value = true;
}
onMounted(registerSessionEvent);
onUnmounted(unRegisterSessionEvent);
</script>
<style lang="less">
@prefix-cls: ~'@{namespace}-header-notify';

56
apps/vue/src/layouts/default/header/components/notify/useNotifications.ts

@ -13,7 +13,7 @@ import { TabItem, ListItem as Notification } from './data';
import { formatPagedRequest } from '/@/utils/http/abp/helper';
import { NotifyEventEnum } from '/@/enums/imEnum';
import { useSignalR } from '/@/hooks/web/useSignalR';
import { useLocalization } from '/@/hooks/abp/useLocalization';
import { useNotificationSerializer } from '/@/hooks/abp/useNotificationSerializer';
import errorAvatar from '/@/assets/icons/64x64/color-error.png';
import warningAvatar from '/@/assets/icons/64x64/color-warning.png';
import infoAvatar from '/@/assets/icons/64x64/color-info.png';
@ -22,6 +22,7 @@ import successAvatar from '/@/assets/icons/64x64/color-success.png';
import emitter from '/@/utils/eventBus';
export function useNotifications() {
const { deserialize } = useNotificationSerializer();
const notifierRef = ref<TabItem>({
key: '1',
name: '通知',
@ -44,50 +45,33 @@ export function useNotifications() {
});
function onNotifyReceived(notificationInfo: NotificationInfo, notifer?: boolean) {
if (notificationInfo.type === NotificationType.ServiceCallback) {
emitter.emit(NotifyEventEnum.NOTIFICATIONS_SERVICE_CALLBACK, notificationInfo);
if (notifer && notificationInfo.type === NotificationType.ServiceCallback) {
// 以通知名称来发起服务端回调
emitter.emit(notificationInfo.name, notificationInfo);
return;
}
const { data } = notificationInfo;
let title = data.extraProperties.title;
let message = data.extraProperties.message;
let description = data.extraProperties.description;
if (!data.extraProperties) {
return;
}
if (data.extraProperties.L === true || data.extraProperties.L === 'true') {
// TODO: 后端统一序列化格式
const { L } = useLocalization(
[data.extraProperties.title.resourceName ?? data.extraProperties.title.ResourceName,
data.extraProperties.message.resourceName ?? data.extraProperties.message.ResourceName,
data.extraProperties.description?.resourceName ?? data.extraProperties.description?.ResourceName ?? "AbpUi"]);
title = L(
data.extraProperties.title.name ?? data.extraProperties.title.Name,
data.extraProperties.title.values ?? data.extraProperties.title.Values,
);
message = L(
data.extraProperties.message.name ?? data.extraProperties.message.Name,
data.extraProperties.message.values ?? data.extraProperties.message.Values,
);
if (description) {
description = L(
data.extraProperties.description.name ?? data.extraProperties.description.Name,
data.extraProperties.description.values ?? data.extraProperties.description.Values,
);
}
}
const {
title,
message,
description,
creationTime,
contentType,
severity,
type,
data,
} = deserialize(notificationInfo);
const notifier: Notification = {
id: notificationInfo.id,
avatar: data.extraProperties.avatar,
avatar: data.avatar,
title: title,
description: message,
extra: description,
datetime: formatToDateTime(notificationInfo.creationTime, 'YYYY-MM-DD HH:mm:ss'),
type: String(notificationInfo.type),
contentType: notificationInfo.contentType,
datetime: formatToDateTime(creationTime, 'YYYY-MM-DD HH:mm:ss'),
type: String(type),
contentType: contentType,
};
notifer && _notification(notifier, notificationInfo.severity);
notifer && _notification(notifier, severity);
emitter.emit(NotifyEventEnum.NOTIFICATIONS_RECEVIED, notificationInfo);
notifierRef.value.list.push(notifier);
}

11
apps/vue/src/store/modules/user.ts

@ -10,6 +10,7 @@ import { useAbpStoreWithOut } from './abp';
import { useAppStoreWithOut } from './app';
import { loginApi, loginPhoneApi, getUserInfo } from '/@/api/sys/user';
import { revokeSession } from '/@/api/account/profiles';
import { useI18n } from '/@/hooks/web/useI18n';
import { useMessage } from '/@/hooks/web/useMessage';
import { router } from '/@/router';
@ -20,6 +21,7 @@ import { h } from 'vue';
import { mgr } from '/@/utils/auth/oidc';
import { formatUrl } from '/@/api/oss-management/files/private';
import { isNullOrWhiteSpace } from '/@/utils/strings';
interface UserState {
userInfo: Nullable<GetUserInfoModel>;
@ -234,7 +236,14 @@ export const useUserStore = defineStore({
title: () => h('span', t('sys.app.logoutTip')),
content: () => h('span', t('sys.app.logoutMessage')),
onOk: async () => {
await this.logout(true);
const abpStore = useAbpStoreWithOut();
const sessionId = abpStore.getApplication?.currentUser?.sessionId
if (!isNullOrWhiteSpace(sessionId)) {
abpStore.resetSession();
await revokeSession(sessionId).finally(() => this.logout(true));
} else {
await this.logout(true);
}
},
});
},

7
apps/vue/src/views/messages/notifications/components/NotificationTable.vue

@ -148,9 +148,10 @@
const expandedRowKeys = ref<string[]>([]);
const selectedRowKeys = ref<string[]>([]);
const typeTitleMap = reactive({
[NotificationType.System]: L('Notifications:System'),
[NotificationType.Application]: L('Notifications:Application'),
[NotificationType.User]: L('Notifications:User'),
[NotificationType.System]: L('NotificationType:System'),
[NotificationType.Application]: L('NotificationType:Application'),
[NotificationType.User]: L('NotificationType:User'),
[NotificationType.ServiceCallback]: L('NotificationType:ServiceCallback'),
});
const getTitle = computed(() => {
return (notifier) => {

88
aspnet-core/framework/common/LINGYUN.Abp.AspNetCore.Wrapper/LINGYUN/Abp/AspNetCore/Wrapper/AbpExceptionHandlingWrapperMiddleware.cs

@ -68,56 +68,68 @@ public class AbpExceptionHandlingWrapperMiddleware : IMiddleware, ITransientDepe
new ExceptionNotificationContext(exception)
);
var wrapOptions = httpContext.RequestServices.GetRequiredService<IOptions<AbpWrapperOptions>>().Value;
if (exception is AbpAuthorizationException)
{
await httpContext.RequestServices.GetRequiredService<IAbpAuthorizationExceptionHandler>()
.HandleAsync(exception.As<AbpAuthorizationException>(), httpContext);
if (!wrapOptions.IsWrapUnauthorizedEnabled)
{
await httpContext.RequestServices.GetRequiredService<IAbpAuthorizationExceptionHandler>()
.HandleAsync(exception.As<AbpAuthorizationException>(), httpContext);
return;
}
var isAuthenticated = httpContext.User?.Identity?.IsAuthenticated ?? false;
if (isAuthenticated)
{
await httpContext.RequestServices.GetRequiredService<IAbpAuthorizationExceptionHandler>()
.HandleAsync(exception.As<AbpAuthorizationException>(), httpContext);
return;
}
}
else
var jsonSerializer = httpContext.RequestServices.GetRequiredService<IJsonSerializer>();
var httpResponseWrapper = httpContext.RequestServices.GetRequiredService<IHttpResponseWrapper>();
var statusCodFinder = httpContext.RequestServices.GetRequiredService<IHttpExceptionStatusCodeFinder>();
var exceptionWrapHandler = httpContext.RequestServices.GetRequiredService<IExceptionWrapHandlerFactory>();
var errorInfoConverter = httpContext.RequestServices.GetRequiredService<IExceptionToErrorInfoConverter>();
var exceptionHandlingOptions = httpContext.RequestServices.GetRequiredService<IOptions<AbpExceptionHandlingOptions>>().Value;
var remoteServiceErrorInfo = errorInfoConverter.Convert(exception, options =>
{
var jsonSerializer = httpContext.RequestServices.GetRequiredService<IJsonSerializer>();
var wrapOptions = httpContext.RequestServices.GetRequiredService<IOptions<AbpWrapperOptions>>().Value;
var httpResponseWrapper = httpContext.RequestServices.GetRequiredService<IHttpResponseWrapper>();
var statusCodFinder = httpContext.RequestServices.GetRequiredService<IHttpExceptionStatusCodeFinder>();
var exceptionWrapHandler = httpContext.RequestServices.GetRequiredService<IExceptionWrapHandlerFactory>();
var errorInfoConverter = httpContext.RequestServices.GetRequiredService<IExceptionToErrorInfoConverter>();
var exceptionHandlingOptions = httpContext.RequestServices.GetRequiredService<IOptions<AbpExceptionHandlingOptions>>().Value;
var remoteServiceErrorInfo = errorInfoConverter.Convert(exception, options =>
{
options.SendExceptionsDetailsToClients = exceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = exceptionHandlingOptions.SendStackTraceToClients;
});
options.SendExceptionsDetailsToClients = exceptionHandlingOptions.SendExceptionsDetailsToClients;
options.SendStackTraceToClients = exceptionHandlingOptions.SendStackTraceToClients;
});
var exceptionWrapContext = new ExceptionWrapContext(
exception,
remoteServiceErrorInfo,
httpContext.RequestServices,
statusCodFinder.GetStatusCode(httpContext, exception));
var exceptionWrapContext = new ExceptionWrapContext(
exception,
remoteServiceErrorInfo,
httpContext.RequestServices,
statusCodFinder.GetStatusCode(httpContext, exception));
exceptionWrapHandler.CreateFor(exceptionWrapContext).Wrap(exceptionWrapContext);
exceptionWrapHandler.CreateFor(exceptionWrapContext).Wrap(exceptionWrapContext);
var wrapperHeaders = new Dictionary<string, string>()
var wrapperHeaders = new Dictionary<string, string>()
{
{ AbpHttpWrapConsts.AbpWrapResult, "true" }
};
var responseWrapperContext = new HttpResponseWrapperContext(
httpContext,
(int)wrapOptions.HttpStatusCode,
wrapperHeaders);
httpResponseWrapper.Wrap(responseWrapperContext);
httpContext.Response.Clear();
httpContext.Response.OnStarting(_clearCacheHeadersDelegate, httpContext.Response);
httpContext.Response.Headers.Append("Content-Type", "application/json");
var wrapResult = new WrapResult(
exceptionWrapContext.ErrorInfo.Code,
exceptionWrapContext.ErrorInfo.Message,
exceptionWrapContext.ErrorInfo.Details);
await httpContext.Response.WriteAsync(jsonSerializer.Serialize(wrapResult));
}
var responseWrapperContext = new HttpResponseWrapperContext(
httpContext,
(int)wrapOptions.HttpStatusCode,
wrapperHeaders);
httpResponseWrapper.Wrap(responseWrapperContext);
httpContext.Response.Clear();
httpContext.Response.OnStarting(_clearCacheHeadersDelegate, httpContext.Response);
httpContext.Response.Headers.Append("Content-Type", "application/json");
var wrapResult = new WrapResult(
exceptionWrapContext.ErrorInfo.Code,
exceptionWrapContext.ErrorInfo.Message,
exceptionWrapContext.ErrorInfo.Details);
await httpContext.Response.WriteAsync(jsonSerializer.Serialize(wrapResult));
}
private Task ClearCacheHeaders(object state)

9
aspnet-core/framework/mvc/LINGYUN.Abp.AspNetCore.Mvc.Wrapper/LINGYUN/Abp/AspNetCore/Mvc/Wrapper/AbpAspNetCoreMvcWrapperModule.cs

@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.ApiExploring;
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;
using Volo.Abp.AspNetCore.Mvc.ProxyScripting;
using Volo.Abp.Content;
@ -65,10 +66,14 @@ public class AbpAspNetCoreMvcWrapperModule : AbpModule
//options.IgnoreReturnTypes.Add<SignOutResult>();
//options.IgnoreReturnTypes.Add<ForbidResult>();
// Abp/ServiceProxyScript
options.IgnoreControllers.Add<AbpServiceProxyScriptController>();
// options.IgnoreControllers.Add<AbpApplicationLocalizationController>();
// options.IgnoreControllers.Add<AbpApplicationConfigurationController>();
// Api Endpoints
options.IgnoreControllers.Add<AbpApiDefinitionController>();
// Abp/ServiceProxyScript
options.IgnoreControllers.Add<AbpServiceProxyScriptController>();
// Application Configuration Script
options.IgnoreControllers.Add<AbpApplicationConfigurationScriptController>();
// 官方模块不包装结果

3
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionClaimsPrincipalContributor.cs

@ -27,7 +27,8 @@ public class IdentitySessionClaimsPrincipalContributor : IAbpClaimsPrincipalCont
var userId = claimsIdentity.FindUserId();
if (userId.HasValue)
{
sessionId = Guid.NewGuid().ToString("N");
var sessionInfoProvider = context.GetRequiredService<ISessionInfoProvider>();
sessionId = sessionInfoProvider.SessionId ?? Guid.NewGuid().ToString("N");
claimsIdentity.AddOrReplace(new Claim(AbpClaimTypes.SessionId, sessionId));
context.ClaimsPrincipal.AddIdentityIfNotContains(claimsIdentity);

2
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Notifications/LINGYUN/Abp/Identity/Notifications/IdentitySessionRevokeEventHandler.cs

@ -48,7 +48,7 @@ public class IdentitySessionRevokeEventHandler :
notificationData.TrySetData("SignedIn", eventData.Entity.SignedIn.ToString("yyyy-MM-dd HH:mm:ss"));
if (eventData.Entity.LastAccessed.HasValue)
{
notificationData.TrySetData("SessionId", eventData.Entity.LastAccessed.Value.ToString("yyyy-MM-dd HH:mm:ss"));
notificationData.TrySetData("LastAccessed", eventData.Entity.LastAccessed.Value.ToString("yyyy-MM-dd HH:mm:ss"));
}
await _notificationSender.SendNofiterAsync(

13
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/AbpSessionMiddleware.cs

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System;
using System.Security.Principal;
using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Middleware;
@ -24,18 +25,18 @@ public class AbpSessionMiddleware : AbpMiddlewareBase, ITransientDependency
public override Task InvokeAsync(HttpContext context, RequestDelegate next)
{
var sessionId = _correlationIdProvider.Get() ?? Guid.NewGuid().ToString("N");
if (context.User.Identity?.IsAuthenticated == true)
{
if (context.RequestServices.GetRequiredService<IOptions<AbpClaimsPrincipalFactoryOptions>>().Value.IsDynamicClaimsEnabled)
{
// 在处理动态声明前保留全局会话用于验证
var sessionId = context.User.FindSessionId();
using (_sessionInfoProvider.Change(sessionId))
{
return next(context);
}
sessionId = context.User.FindSessionId();
}
}
return next(context);
using (_sessionInfoProvider.Change(sessionId))
{
return next(context);
}
}
}

6
aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/UserFavoriteMenuController.cs

@ -28,7 +28,7 @@ public class UserFavoriteMenuController : PlatformControllerBase, IUserFavoriteM
}
[HttpPost]
[Route("my-favorite-menu")]
[Route("my-favorite-menus")]
public virtual Task<UserFavoriteMenuDto> CreateMyFavoriteMenuAsync(UserFavoriteMenuCreateDto input)
{
return Service.CreateMyFavoriteMenuAsync(input);
@ -42,7 +42,7 @@ public class UserFavoriteMenuController : PlatformControllerBase, IUserFavoriteM
}
[HttpDelete]
[Route("my-favorite-menu/{MenuId}")]
[Route("my-favorite-menus/{MenuId}")]
public virtual Task DeleteMyFavoriteMenuAsync(UserFavoriteMenuRemoveInput input)
{
return Service.DeleteMyFavoriteMenuAsync(input);
@ -70,7 +70,7 @@ public class UserFavoriteMenuController : PlatformControllerBase, IUserFavoriteM
}
[HttpPut]
[Route("my-favorite-menu")]
[Route("my-favorite-menus")]
public virtual Task<UserFavoriteMenuDto> UpdateMyFavoriteMenuAsync(UserFavoriteMenuUpdateDto input)
{
return Service.UpdateMyFavoriteMenuAsync(input);

17
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/SignalRNotificationPublishProvider.cs

@ -34,11 +34,18 @@ public class SignalRNotificationPublishProvider : NotificationPublishProvider
if (identifiers?.Count() == 0)
{
var groupName = notification.TenantId?.ToString() ?? "Global";
var singalRGroup = _hubContext.Clients.Group(groupName);
// 租户通知群发
Logger.LogDebug($"Found a singalr group, begin senging notifications");
await singalRGroup.SendAsync(_options.MethodName, notification, cancellationToken);
try
{
var singalRGroup = _hubContext.Clients.Group(groupName);
// 租户通知群发
Logger.LogDebug($"Found a singalr group, begin senging notifications");
await singalRGroup.SendAsync(_options.MethodName, notification, cancellationToken);
}
catch (Exception ex)
{
Logger.LogWarning("Could not send notifications to group {0}", groupName);
Logger.LogWarning("Send to user notifications error: {0}", ex.Message);
}
}
else
{

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

@ -9,7 +9,6 @@ using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Identity;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.Identity.Notifications;
using LINGYUN.Abp.Identity.Session.AspNetCore;
using LINGYUN.Abp.Localization.CultureMap;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
@ -20,7 +19,6 @@ using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
using LINGYUN.Abp.Sms.Aliyun;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Volo.Abp;
@ -47,7 +45,6 @@ namespace LY.MicroService.AuthServer;
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpIdentityNotificationsModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpIdentityHttpApiModule),
typeof(AbpIdentityEntityFrameworkCoreModule),

1
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj

@ -71,7 +71,6 @@
<ItemGroup>
<ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application\LINGYUN.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.HttpApi\LINGYUN.Abp.Account.HttpApi.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Notifications\LINGYUN.Abp.Identity.Notifications.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj" />
<ProjectReference Include="..\..\modules\openIddict\LINGYUN.Abp.OpenIddict.Application\LINGYUN.Abp.OpenIddict.Application.csproj" />
<ProjectReference Include="..\..\modules\openIddict\LINGYUN.Abp.OpenIddict.HttpApi\LINGYUN.Abp.OpenIddict.HttpApi.csproj" />

2
aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs

@ -8,7 +8,6 @@ using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.Identity.AspNetCore.Session;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.Identity.Notifications;
using LINGYUN.Abp.Identity.OrganizaztionUnits;
using LINGYUN.Abp.Identity.Session.AspNetCore;
using LINGYUN.Abp.Localization.CultureMap;
@ -59,7 +58,6 @@ namespace LY.MicroService.AuthServer;
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpIdentityAspNetCoreSessionModule),
typeof(AbpIdentityNotificationsModule),
typeof(AbpOpenIddictAspNetCoreSessionModule),
typeof(AbpOpenIddictEntityFrameworkCoreModule),
typeof(AbpOpenIddictSmsModule),

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

@ -76,7 +76,6 @@
<ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application\LINGYUN.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Application.Contracts\LINGYUN.Abp.Identity.Application.Contracts.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.AspNetCore.Session\LINGYUN.Abp.Identity.AspNetCore.Session.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Notifications\LINGYUN.Abp.Identity.Notifications.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.OrganizaztionUnits\LINGYUN.Abp.Identity.OrganizaztionUnits.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj" />

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

@ -14,7 +14,6 @@ using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.FeatureManagement;
using LINGYUN.Abp.FeatureManagement.HttpApi;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.Identity.Session;
using LINGYUN.Abp.Identity.Session.AspNetCore;
using LINGYUN.Abp.Localization.CultureMap;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;

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

@ -40,7 +40,6 @@ namespace LY.MicroService.IdentityServer;
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(LINGYUN.Abp.Account.AbpAccountApplicationModule),
typeof(LINGYUN.Abp.Account.AbpAccountHttpApiModule),
typeof(LINGYUN.Abp.Identity.Notifications.AbpIdentityNotificationsModule),
typeof(LINGYUN.Abp.Identity.AbpIdentityApplicationModule),
typeof(LINGYUN.Abp.Identity.AbpIdentityHttpApiModule),
typeof(LINGYUN.Abp.IdentityServer.AbpIdentityServerApplicationModule),

1
aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/LY.MicroService.identityServer.HttpApi.Host.csproj

@ -83,7 +83,6 @@
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Application\LINGYUN.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.HttpApi\LINGYUN.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Notifications\LINGYUN.Abp.Identity.Notifications.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj" />
<ProjectReference Include="..\..\modules\localization-management\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />

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

@ -9,7 +9,6 @@ using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.Http.Client.Wrapper;
using LINGYUN.Abp.Identity.AspNetCore.Session;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.Identity.Notifications;
using LINGYUN.Abp.Identity.OrganizaztionUnits;
using LINGYUN.Abp.Identity.Session.AspNetCore;
using LINGYUN.Abp.IdentityServer;
@ -59,7 +58,6 @@ namespace LY.MicroService.IdentityServer;
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpIdentityNotificationsModule),
// 请勿混淆这两个模块, 他们各自都自己的职能
// 此模块仅用于认证中心

1
aspnet-core/services/LY.MicroService.IdentityServer/LY.MicroService.IdentityServer.csproj

@ -80,7 +80,6 @@
<ProjectReference Include="..\..\modules\identityServer\LINGYUN.Abp.IdentityServer.WeChat.Work\LINGYUN.Abp.IdentityServer.WeChat.Work.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.AspNetCore.Session\LINGYUN.Abp.Identity.AspNetCore.Session.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Notifications\LINGYUN.Abp.Identity.Notifications.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.OrganizaztionUnits\LINGYUN.Abp.Identity.OrganizaztionUnits.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj" />
<ProjectReference Include="..\..\modules\localization-management\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore.csproj" />

12
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs

@ -418,11 +418,15 @@ namespace LY.MicroService.RealtimeMessage.EventBus.Distributed
try
{
Logger.LogDebug($"Sending notification with provider {provider.Name}");
var notifacationDataMapping = Options.NotificationDataMappings
.GetMapItemOrDefault(provider.Name, notificationInfo.Name);
if (notifacationDataMapping != null)
if (notificationInfo.Type != NotificationType.ServiceCallback)
{
notificationInfo.Data = notifacationDataMapping.MappingFunc(notificationInfo.Data);
var notifacationDataMapping = Options.NotificationDataMappings
.GetMapItemOrDefault(provider.Name, notificationInfo.Name);
if (notifacationDataMapping != null)
{
notificationInfo.Data = notifacationDataMapping.MappingFunc(notificationInfo.Data);
}
}
// 发布
await provider.PublishAsync(notificationInfo, subscriptionUsers);

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

@ -74,6 +74,7 @@
<ItemGroup>
<ProjectReference Include="..\..\migrations\LY.MicroService.RealtimeMessage.EntityFrameworkCore\LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Notifications\LINGYUN.Abp.Identity.Notifications.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj" />
<ProjectReference Include="..\..\modules\realtime-message\LINGYUN.Abp.IM.SignalR\LINGYUN.Abp.IM.SignalR.csproj" />
<ProjectReference Include="..\..\modules\realtime-notifications\LINGYUN.Abp.ExceptionHandling.Notifications\LINGYUN.Abp.ExceptionHandling.Notifications.csproj" />

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

@ -358,7 +358,7 @@ public partial class RealtimeMessageHttpApiHostModule
{
// 宿主项目启用动态通知
options.IsDynamicNotificationsStoreEnabled = true;
options.SaveStaticNotificationsToDatabase = false;
options.SaveStaticNotificationsToDatabase = true;
});
}

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

@ -12,6 +12,7 @@ using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.ExceptionHandling.Notifications;
using LINGYUN.Abp.Features.LimitValidation.Redis;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.Identity.Notifications;
using LINGYUN.Abp.Identity.Session.AspNetCore;
using LINGYUN.Abp.Identity.WeChat;
using LINGYUN.Abp.Identity.WeChat.Work;
@ -97,6 +98,7 @@ namespace LY.MicroService.RealtimeMessage;
typeof(AbpNotificationsWeChatMiniProgramModule),
typeof(AbpNotificationsWeChatWorkModule),
typeof(AbpNotificationsExceptionHandlingModule),
typeof(AbpIdentityNotificationsModule),
// 重写模板引擎支持外部本地化
typeof(AbpTextTemplatingScribanModule),

4
build/build-aspnetcore-common.ps1

@ -16,7 +16,7 @@ $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/"; Service = "task-management" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/"; Service = "webhooks" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/"; Service = "workflow" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/"; Service = "internal-apigateway" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/"; Service = "internal-apigateway" }
[PsObject[]]$solutionArray = @()
$solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.All.sln" }
@ -25,7 +25,7 @@ $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.Mic
$solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln" }
$solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.Workflow.sln" }
$solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.SingleProject.sln" }
$solutionArray += [PsObject]@{ File = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/LINGYUN.MicroService.Internal.ApiGateway.sln" }
$solutionArray += [PsObject]@{ File = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/LINGYUN.MicroService.Internal.Gateway.sln" }
[PsObject[]]$migrationArray = @()
$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.Platform.DbMigrator" }

42
docker-compose.override.configuration.yml

@ -52,7 +52,9 @@ services:
- Redis__Configuration=host.docker.internal,defaultDatabase=10
- Redis__InstanceName=LINGYUN.Abp.Application
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false
- IdentityServer__Clients__InternalService__ClientId=InternalServiceClient
- IdentityServer__Clients__AuthVueAdmin__ClientId=vue-admin-client
- IdentityServer__Clients__AuthVueAdmin__RootUrl=http://localhost:3100/
@ -106,7 +108,9 @@ services:
- Redis__Configuration=host.docker.internal,defaultDatabase=10
- Redis__InstanceName=LINGYUN.Abp.Application
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false
admin-api:
environment:
@ -160,7 +164,9 @@ services:
- Redis__Configuration=host.docker.internal,defaultDatabase=10
- Redis__InstanceName=LINGYUN.Abp.Application
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false
localization-api:
environment:
@ -211,7 +217,9 @@ services:
- Redis__Configuration=host.docker.internal,defaultDatabase=10
- Redis__InstanceName=LINGYUN.Abp.Application
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false
platform-api:
environment:
@ -272,7 +280,9 @@ services:
- Redis__Configuration=host.docker.internal,defaultDatabase=10
- Redis__InstanceName=LINGYUN.Abp.Application
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false
messages-api:
environment:
@ -322,8 +332,11 @@ services:
- Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200
- Redis__Configuration=host.docker.internal,defaultDatabase=10
- Redis__InstanceName=LINGYUN.Abp.Application
- SignalR__Redis__Configuration=host.docker.internal,defaultDatabase=13,channelPrefix=abp-realtime-channel
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false
- Notifications__WeChat__WeApp__DefaultWeAppState=formal
task-api:
@ -375,7 +388,9 @@ services:
- Redis__Configuration=host.docker.internal,defaultDatabase=10
- Redis__InstanceName=LINGYUN.Abp.Application
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false
webhook-api:
environment:
@ -426,7 +441,9 @@ services:
- Redis__Configuration=host.docker.internal,defaultDatabase=10
- Redis__InstanceName=LINGYUN.Abp.Application
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false
workflow-api:
environment:
@ -487,7 +504,10 @@ services:
- IdentityClients__InternalServiceClient__ClientSecret=1q2w3e*
- IdentityClients__InternalServiceClient__RequireHttps=false
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false
internal-apigateway:
environment:
@ -506,4 +526,6 @@ services:
- Redis__Configuration=host.docker.internal,defaultDatabase=10
- Redis__InstanceName=LINGYUN.Abp.Application
- AuthServer__Authority=http://auth-server:44385
- AuthServer__ApiName=lingyun-abp-application
- AuthServer__Audience=lingyun-abp-application
- AuthServer__MapInboundClaims=false
- AuthServer__RequireHttpsMetadata=false

42
docker-compose.yml

@ -2,8 +2,8 @@ version: '3.4'
services:
admin-api:
hostname: admin
container_name: admin
hostname: admin-api
container_name: admin-api
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_HTTP_PORTS=80
@ -42,8 +42,8 @@ services:
- "auth-server:host-gateway"
localization-api:
hostname: localization
container_name: localization
hostname: localization-api
container_name: localization-api
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_HTTP_PORTS=80
@ -62,8 +62,8 @@ services:
- "auth-server:host-gateway"
platform-api:
hostname: platform
container_name: platform
hostname: platform-api
container_name: platform-api
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_HTTP_PORTS=80
@ -82,8 +82,8 @@ services:
- "auth-server:host-gateway"
messages-api:
hostname: messages
container_name: messages
hostname: messages-api
container_name: messages-api
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_HTTP_PORTS=80
@ -102,8 +102,8 @@ services:
- "auth-server:host-gateway"
task-api:
hostname: task
container_name: task
hostname: tasks-api
container_name: tasks-api
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_HTTP_PORTS=80
@ -122,8 +122,8 @@ services:
- "auth-server:host-gateway"
webhook-api:
hostname: webhook
container_name: webhook
hostname: webhooks-api
container_name: webhooks-api
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_HTTP_PORTS=80
@ -142,8 +142,8 @@ services:
- "auth-server:host-gateway"
workflow-api:
hostname: workflow
container_name: workflow
hostname: workflow-api
container_name: workflow-api
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_HTTP_PORTS=80
@ -196,13 +196,13 @@ services:
- "host.docker.internal:host-gateway"
- "auth-server:host-gateway"
- "auth-server-api:host-gateway"
- "localization:host-gateway"
- "workflow:host-gateway"
- "webhook:host-gateway"
- "messages:host-gateway"
- "platform:host-gateway"
- "task:host-gateway"
- "admin:host-gateway"
- "localization-api:host-gateway"
- "workflow-api:host-gateway"
- "webhooks-api:host-gateway"
- "messages-api:host-gateway"
- "platform-api:host-gateway"
- "tasks-api:host-gateway"
- "admin-api:host-gateway"
ui:
restart: always

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

@ -1,4 +1,5 @@
using Autofac.Core;
using DeviceDetectorNET.Parser.Device;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.Serilog.Enrichers.Application;
using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
@ -18,6 +19,7 @@ using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.ApiExploring;
@ -28,6 +30,7 @@ using Volo.Abp.Data;
using Volo.Abp.Modularity;
using Volo.Abp.Swashbuckle;
using Yarp.ReverseProxy.Configuration;
using Yarp.Telemetry.Consumption;
namespace LINGYUN.MicroService.Internal.Gateway;
@ -128,8 +131,14 @@ public class InternalGatewayModule : AbpModule
});
context.Services.AddHttpForwarder();
context.Services.AddTelemetryListeners();
context.Services
.AddReverseProxy()
.ConfigureHttpClient((context, handler) =>
{
handler.ActivityHeadersPropagator = null;
})
.LoadFromConfig(configuration.GetSection("ReverseProxy"));
}
@ -182,24 +191,30 @@ public class InternalGatewayModule : AbpModule
continue;
}
options.SwaggerEndpoint($"{clusterGroup.Value.Address}/swagger/v1/swagger.json", $"{routeConfig.RouteId} API");
var swaggerEndpoint = clusterGroup.Value.Address;
if (clusterGroup.Value.Metadata != null &&
clusterGroup.Value.Metadata.TryGetValue("SwaggerEndpoint", out var address) &&
!address.IsNullOrWhiteSpace())
{
swaggerEndpoint = address;
}
options.SwaggerEndpoint($"{swaggerEndpoint}/swagger/v1/swagger.json", $"{routeConfig.RouteId} API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
}
});
app.UseRewriter(new RewriteOptions().AddRedirect("^(|\\|\\s+)$", "/swagger"));
// app.UseRewriter(new RewriteOptions().AddRedirect("^(|\\|\\s+)$", "/swagger"));
app.UseRouting();
app.UseAuditing();
app.UseWebSockets();
app.UseWebSocketsTelemetry();
app.UseConfiguredEndpoints(endpoints =>
{
endpoints.MapReverseProxy(options =>
{
options.UseLoadBalancing();
});
endpoints.MapReverseProxy();
});
app.UseWebSockets();
app.UseAbpSerilogEnrichers();
}
}

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

@ -10,6 +10,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" />
<PackageReference Include="Yarp.ReverseProxy" />
<PackageReference Include="Yarp.Telemetry.Consumption" />
<PackageReference Include="AgileConfig.Client" />
<PackageReference Include="Serilog.AspNetCore" />
<PackageReference Include="Serilog.Enrichers.Environment" />

2
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.Gateway/Properties/launchSettings.json

@ -5,7 +5,7 @@
"launchBrowser": false,
"dotnetRunMessages": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:30000"
}

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

@ -24,8 +24,10 @@
"AbpTextTemplating": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456"
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"ApiName": "lingyun-abp-application"
"Authority": "http://auth-server:44385/",
"Audience": "lingyun-abp-application",
"MapInboundClaims": false,
"RequireHttpsMetadata": false
},
"Logging": {
"Serilog": {
@ -46,10 +48,10 @@
"MinimumLevel": {
"Default": "Information",
"Override": {
"System": "Warning",
"Microsoft": "Warning",
"System": "Debug",
"Microsoft": "Debug",
"DotNetCore": "Warning",
"Yarp.ReverseProxy": "Information"
"Yarp.ReverseProxy": "Debug"
}
},
"WriteTo": [

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

@ -2,7 +2,7 @@
"ReverseProxy": {
"Routes": {
"abp-route": {
"ClusterId": "abp-cluster",
"ClusterId": "admin-api-cluster",
"Match": {
"Path": "/api/abp/{**everything}"
},
@ -10,26 +10,29 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"token-route": {
"ClusterId": "token-cluster",
"auth-server-route": {
"ClusterId": "auth-server-cluster",
"Match": {
"Path": "/connect/{**everything}"
},
"Transforms": [
{
"RequestHeaderOriginalHost": "true"
},
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"account-route": {
"ClusterId": "auth-cluster",
"ClusterId": "auth-server-api-cluster",
"Match": {
"Path": "/api/account/{**everything}"
},
@ -37,11 +40,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"identity-route": {
"ClusterId": "auth-cluster",
"ClusterId": "auth-server-api-cluster",
"Match": {
"Path": "/api/identity/{**everything}"
},
@ -49,11 +55,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"identity-server-route": {
"ClusterId": "auth-cluster",
"ClusterId": "auth-server-api-cluster",
"Match": {
"Path": "/api/identity-server/{**everything}"
},
@ -61,11 +70,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"cache-management-route": {
"ClusterId": "admin-cluster",
"ClusterId": "admin-api-cluster",
"Match": {
"Path": "/api/caching-management/{**everything}"
},
@ -73,11 +85,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"saas-route": {
"ClusterId": "admin-cluster",
"ClusterId": "admin-api-cluster",
"Match": {
"Path": "/api/saas/{**everything}"
},
@ -85,11 +100,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"auditing-route": {
"ClusterId": "admin-cluster",
"ClusterId": "admin-api-cluster",
"Match": {
"Path": "/api/auditing/{**everything}"
},
@ -97,11 +115,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"data-protected-route": {
"ClusterId": "admin-cluster",
"ClusterId": "admin-api-cluster",
"Match": {
"Path": "/api/data-protection-management/{**everything}"
},
@ -109,11 +130,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"text-template-route": {
"ClusterId": "admin-cluster",
"ClusterId": "admin-api-cluster",
"Match": {
"Path": "/api/text-templating/{**everything}"
},
@ -121,11 +145,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"feature-management-route": {
"ClusterId": "admin-cluster",
"ClusterId": "admin-api-cluster",
"Match": {
"Path": "/api/feature-management/{**everything}"
},
@ -133,11 +160,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"permission-management-route": {
"ClusterId": "admin-cluster",
"ClusterId": "admin-api-cluster",
"Match": {
"Path": "/api/permission-management/{**everything}"
},
@ -145,11 +175,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"setting-management-route": {
"ClusterId": "admin-cluster",
"ClusterId": "admin-api-cluster",
"Match": {
"Path": "/api/setting-management/{**everything}"
},
@ -157,11 +190,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"localization-management-route": {
"ClusterId": "localization-cluster",
"ClusterId": "localization-api-cluster",
"Match": {
"Path": "/api/localization/{**everything}"
},
@ -169,11 +205,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"im-route": {
"ClusterId": "realtime-cluster",
"ClusterId": "messages-api-cluster",
"Match": {
"Path": "/api/im/{**everything}"
},
@ -181,11 +220,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"notifications-route": {
"ClusterId": "realtime-cluster",
"ClusterId": "messages-api-cluster",
"Match": {
"Path": "/api/notifications/{**everything}"
},
@ -193,11 +235,35 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"signalr-route": {
"ClusterId": "messages-api-cluster",
"Match": {
"Path": "/signalr-hubs/{**everything}"
},
"Transforms": [
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
},
{
"RequestHeadersCopy": true
},
{
"ResponseHeadersCopy": true
}
]
},
"webhooks-management-route": {
"ClusterId": "webhooks-cluster",
"ClusterId": "webhooks-api-cluster",
"Match": {
"Path": "/api/webhooks/{**everything}"
},
@ -205,11 +271,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"task-management-route": {
"ClusterId": "tasks-cluster",
"ClusterId": "tasks-api-cluster",
"Match": {
"Path": "/api/task-management/{**everything}"
},
@ -217,11 +286,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"platform-route": {
"ClusterId": "platform-cluster",
"ClusterId": "platform-api-cluster",
"Match": {
"Path": "/api/platform/{**everything}"
},
@ -229,11 +301,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"oss-route": {
"ClusterId": "platform-cluster",
"ClusterId": "platform-api-cluster",
"Match": {
"Path": "/api/oss-management/{**everything}"
},
@ -241,11 +316,14 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
},
"files-route": {
"ClusterId": "platform-cluster",
"ClusterId": "platform-api-cluster",
"Match": {
"Path": "/api/files/{**everything}"
},
@ -253,71 +331,101 @@
{
"HeaderPrefix": "X-Forwarded-",
"X-Forwarded": "Append"
},
{
"ResponseHeadersAllowed": "_AbpWrapResult;_AbpDontWrapResult;_AbpErrorFormat"
}
]
}
},
"Clusters": {
"abp-cluster": {
"auth-server-cluster": {
"Destinations": {
"destination1": {
"Address": "http://127.0.0.1:30010"
"Address": "http://auth-server:44385",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:44385"
}
}
}
},
"token-cluster": {
"auth-server-api-cluster": {
"Destinations": {
"destination1": {
"Address": "http://127.0.0.1:44385"
"Address": "http://auth-server-api:30015",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30015"
}
}
}
},
"auth-cluster": {
"admin-api-cluster": {
"Destinations": {
"destination1": {
"Address": "http://127.0.0.1:30015"
"Address": "http://admin-api:30010",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30010"
}
}
}
},
"admin-cluster": {
"localization-api-cluster": {
"Destinations": {
"destination1": {
"Address": "https://127.0.0.1:30010"
"Address": "http://localization-api:30030",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30030"
}
}
}
},
"localization-cluster": {
"messages-api-cluster": {
"Destinations": {
"destination1": {
"Address": "http://127.0.0.1:30030"
"Address": "http://messages-api:30020",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30020"
}
}
}
},
"realtime-cluster": {
"webhooks-api-cluster": {
"Destinations": {
"destination1": {
"Address": "http://127.0.0.1:30020"
"Address": "http://webhooks-api:30045",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30045"
}
}
}
},
"webhooks-cluster": {
"tasks-api-cluster": {
"Destinations": {
"destination1": {
"Address": "http://127.0.0.1:30045"
"Address": "http://tasks-api:30040",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30040"
}
}
}
},
"tasks-cluster": {
"platform-api-cluster": {
"Destinations": {
"destination1": {
"Address": "http://127.0.0.1:30040"
"Address": "http://platform-api:30025",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30025"
}
}
}
},
"platform-cluster": {
"workflow-api-cluster": {
"Destinations": {
"destination1": {
"Address": "http://127.0.0.1:30025"
"Address": "http://workflow-api:30050",
"Metadata": {
"SwaggerEndpoint": "http://127.0.0.1:30050"
}
}
}
}

Loading…
Cancel
Save