-
-
+
+
-
+
-
+
\ No newline at end of file
diff --git a/apps/vue/src/views/identity/user/components/SessionModal.vue b/apps/vue/src/views/identity/user/components/SessionModal.vue
new file mode 100644
index 000000000..6fff33c21
--- /dev/null
+++ b/apps/vue/src/views/identity/user/components/SessionModal.vue
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
{{ identitySession.device }}
+
+ {{ L('CurrentSession') }}
+
+
+
+
+ {{ identitySession.sessionId }}
+ {{ identitySession.device }}
+ {{ identitySession.deviceInfo }}
+ {{ identitySession.clientId }}
+ {{ identitySession.ipAddresses }}
+ {{ formatToDateTime(identitySession.signedIn) }}
+ {{ formatToDateTime(identitySession.lastAccessed) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/vue/src/views/identity/user/components/UserTable.vue b/apps/vue/src/views/identity/user/components/UserTable.vue
index 4fed8f74d..43f9e250a 100644
--- a/apps/vue/src/views/identity/user/components/UserTable.vue
+++ b/apps/vue/src/views/identity/user/components/UserTable.vue
@@ -57,6 +57,11 @@
ifShow: !lockEnd(record),
onClick: showLockModal.bind(null, record.id),
},
+ {
+ auth: 'AbpIdentity.IdentitySessions',
+ label: L('IdentitySessions'),
+ onClick: handleShowSessionModal.bind(null, record),
+ },
{
auth: 'AbpIdentity.Users.Update',
label: L('UnLock'),
@@ -90,6 +95,7 @@
+
import('./SessionModal.vue'));
const emits = defineEmits(['change']);
@@ -146,6 +154,7 @@
const { registerLockModal, showLockModal, handleUnLock } = useLock({ emit: emits });
const { registerPasswordModal, showPasswordModal } = usePassword(nullFormElRef);
const [registerClaimModal, { openModal: openClaimModal }] = useModal();
+ const [registerSessionModal, { openModal: openSessionModal }] = useModal();
const [registerMenuModal, { openModal: openMenuModal, closeModal: closeMenuModal }] = useModal();
const { registerModel: registerPermissionModal, showPermissionModal } = usePermissionModal();
@@ -188,4 +197,8 @@
function handleShowClaims(record) {
openClaimModal(true, { id: record.id });
}
+
+ function handleShowSessionModal(record) {
+ openSessionModal(true, { userId: record.id });
+ }
diff --git a/apps/vue/types/abp.d.ts b/apps/vue/types/abp.d.ts
index 521a61488..cfc6038d8 100644
--- a/apps/vue/types/abp.d.ts
+++ b/apps/vue/types/abp.d.ts
@@ -110,6 +110,7 @@ declare interface CurrentUser {
phoneNumber?: string;
phoneNumberVerified: boolean;
roles: string[];
+ sessionId?: string;
}
type SimpleStateCheckerResult> = Recordable<
diff --git a/aspnet-core/LINGYUN.MicroService.All.sln b/aspnet-core/LINGYUN.MicroService.All.sln
index f755a0998..8e2f552fa 100644
--- a/aspnet-core/LINGYUN.MicroService.All.sln
+++ b/aspnet-core/LINGYUN.MicroService.All.sln
@@ -742,73 +742,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenApi.OpenIdd
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TextTemplating.Scriban", "modules\text-templating\LINGYUN.Abp.TextTemplating.Scriban\LINGYUN.Abp.TextTemplating.Scriban.csproj", "{15482834-9242-4D20-9736-9DA571A9A83A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Claims.Mapping", "framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj", "{8A255A72-50FC-460E-9897-FA53F455580B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Claims.Mapping", "framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj", "{8A255A72-50FC-460E-9897-FA53F455580B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WeChat.Work.Common", "framework\wechat\LINGYUN.Abp.WeChat.Work.Common\LINGYUN.Abp.WeChat.Work.Common.csproj", "{46038910-8EDD-4822-8768-097B7D276FED}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.Work.Common", "framework\wechat\LINGYUN.Abp.WeChat.Work.Common\LINGYUN.Abp.WeChat.Work.Common.csproj", "{CED33625-A034-475B-A4C0-A4E7D1BADD10}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.TaskManagement.Domain.Shared", "modules\task-management\LINGYUN.Abp.TaskManagement.Domain.Shared\LINGYUN.Abp.TaskManagement.Domain.Shared.csproj", "{332F2031-6B67-4199-8BA4-317679D2FFF8}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Session", "modules\identity\LINGYUN.Abp.Identity.Session\LINGYUN.Abp.Identity.Session.csproj", "{E3BA2413-5755-4F61-9A7C-5D49AE9E7016}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.BackgroundTasks", "modules\task-management\LINGYUN.Abp.BackgroundTasks\LINGYUN.Abp.BackgroundTasks.csproj", "{C8138D8C-BF2B-41CB-BEA2-3ACC5E70E306}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Session.AspNetCore", "modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj", "{BF85DB7F-70C2-4804-AA57-FACE204981DA}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.BackgroundTasks.Quartz", "modules\task-management\LINGYUN.Abp.BackgroundTasks.Quartz\LINGYUN.Abp.BackgroundTasks.Quartz.csproj", "{FF53669D-560C-4791-BE9A-28231C15FA4E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IdentityServer.Session", "modules\identityServer\LINGYUN.Abp.IdentityServer.Session\LINGYUN.Abp.IdentityServer.Session.csproj", "{893F7376-0913-43DC-AD3D-40AF5B8F9E3B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.BackgroundTasks.DistributedLocking", "modules\task-management\LINGYUN.Abp.BackgroundTasks.DistributedLocking\LINGYUN.Abp.BackgroundTasks.DistributedLocking.csproj", "{2F8BB49E-92E5-4468-8656-BD4BC03FA505}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.AspNetCore.Session", "modules\identity\LINGYUN.Abp.Identity.AspNetCore.Session\LINGYUN.Abp.Identity.AspNetCore.Session.csproj", "{8826831D-8733-473A-B47B-A30C3732B13D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.BackgroundTasks.ExceptionHandling", "modules\task-management\LINGYUN.Abp.BackgroundTasks.ExceptionHandling\LINGYUN.Abp.BackgroundTasks.ExceptionHandling.csproj", "{5CAC42F1-58A4-4716-B8E5-E28042D1B612}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.AspNetCore.Session", "modules\openIddict\LINGYUN.Abp.OpenIddict.AspNetCore.Session\LINGYUN.Abp.OpenIddict.AspNetCore.Session.csproj", "{D1484DD3-BB0A-45A4-BED5-FFA132DE2E72}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.TaskManagement.EntityFrameworkCore", "modules\task-management\LINGYUN.Abp.TaskManagement.EntityFrameworkCore\LINGYUN.Abp.TaskManagement.EntityFrameworkCore.csproj", "{7D235CB7-EC8E-418F-978A-D2E6EA5F9E9A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.BackgroundTasks.Activities", "modules\task-management\LINGYUN.Abp.BackgroundTasks.Activities\LINGYUN.Abp.BackgroundTasks.Activities.csproj", "{F78B0978-4ECF-4EA3-89A7-9492AE33CB30}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.TaskManagement.Domain", "modules\task-management\LINGYUN.Abp.TaskManagement.Domain\LINGYUN.Abp.TaskManagement.Domain.csproj", "{7C1A3331-D3D0-4CF0-A7D4-9E27F507AB02}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.TaskManagement.Application", "modules\task-management\LINGYUN.Abp.TaskManagement.Application\LINGYUN.Abp.TaskManagement.Application.csproj", "{DC4AB835-76CA-4439-9A14-473B3838F856}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.BackgroundTasks.EventBus", "modules\task-management\LINGYUN.Abp.BackgroundTasks.EventBus\LINGYUN.Abp.BackgroundTasks.EventBus.csproj", "{3310571F-1B30-49A4-AD24-0CF5C91C58F7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.TaskManagement.HttpApi", "modules\task-management\LINGYUN.Abp.TaskManagement.HttpApi\LINGYUN.Abp.TaskManagement.HttpApi.csproj", "{00C8A2BC-361D-4999-AEC3-BA4DD7991A9D}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WebhooksManagement.Application.Contracts", "modules\webhooks\LINGYUN.Abp.WebhooksManagement.Application.Contracts\LINGYUN.Abp.WebhooksManagement.Application.Contracts.csproj", "{D60CF8FB-45BB-4F95-97EB-E1CE54B3105A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WebhooksManagement.Application", "modules\webhooks\LINGYUN.Abp.WebhooksManagement.Application\LINGYUN.Abp.WebhooksManagement.Application.csproj", "{7D83C686-7BF0-4037-B927-A502D55D01F8}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WebhooksManagement.Domain", "modules\webhooks\LINGYUN.Abp.WebhooksManagement.Domain\LINGYUN.Abp.WebhooksManagement.Domain.csproj", "{C7F7F9E2-F877-4658-BFEC-E47AE27B0139}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WebhooksManagement.Domain.Shared", "modules\webhooks\LINGYUN.Abp.WebhooksManagement.Domain.Shared\LINGYUN.Abp.WebhooksManagement.Domain.Shared.csproj", "{2BC04B60-6959-47FF-8860-96AB51986584}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore", "modules\webhooks\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore.csproj", "{1752BAA2-4305-4655-99B4-6832E2CE6CAF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WebhooksManagement.HttpApi", "modules\webhooks\LINGYUN.Abp.WebhooksManagement.HttpApi\LINGYUN.Abp.WebhooksManagement.HttpApi.csproj", "{6F2A09CE-183E-4FBA-BB12-DD6105B90B00}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WebhooksManagement.HttpApi.Client", "modules\webhooks\LINGYUN.Abp.WebhooksManagement.HttpApi.Client\LINGYUN.Abp.WebhooksManagement.HttpApi.Client.csproj", "{5E3E2B57-4BF1-45A7-9BAE-EDA000F27C80}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.TaskManagement.HttpApi.Host", "services\LY.MicroService.TaskManagement.HttpApi.Host\LY.MicroService.TaskManagement.HttpApi.Host.csproj", "{7D760508-A5A8-44D9-8958-F5AD5F1B7949}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "task", "task", "{C1EFDD32-5524-4DDD-9925-88B6E3530994}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.WebhooksManagement.HttpApi.Host", "services\LY.MicroService.WebhooksManagement.HttpApi.Host\LY.MicroService.WebhooksManagement.HttpApi.Host.csproj", "{2D3B6C77-465E-4D39-A83D-47E74F14D6D0}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webhooks", "webhooks", "{0107020D-22E5-4DDF-8A62-5DE850BA6C79}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.WorkflowManagement.HttpApi.Host", "services\LY.MicroService.WorkflowManagement.HttpApi.Host\LY.MicroService.WorkflowManagement.HttpApi.Host.csproj", "{E8139252-2F6D-437D-97C7-6FB77C705E58}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflow", "workflow", "{74319001-6F4B-41D9-BE32-128EC12AB10B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.BackgroundTasks.Notifications", "modules\task-management\LINGYUN.Abp.BackgroundTasks.Notifications\LINGYUN.Abp.BackgroundTasks.Notifications.csproj", "{40FEF2F7-BB0E-4192-89EE-BDA98B3E4007}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.TaskManagement.EntityFrameworkCore", "migrations\LY.MicroService.TaskManagement.EntityFrameworkCore\LY.MicroService.TaskManagement.EntityFrameworkCore.csproj", "{CE309DF2-FB96-4917-9DC6-14DC1DED7EED}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "task", "task", "{A922E0EE-5302-4E2B-9D84-0EC681416DA2}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Webhooks.Identity", "modules\webhooks\LINGYUN.Abp.Webhooks.Identity\LINGYUN.Abp.Webhooks.Identity.csproj", "{27505FC3-2659-40CC-A9C7-0857FBECE099}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Webhooks.Saas", "modules\webhooks\LINGYUN.Abp.Webhooks.Saas\LINGYUN.Abp.Webhooks.Saas.csproj", "{1E6F9CF8-577C-45A7-A2E0-2BB3C40AFB9D}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Webhooks.EventBus", "modules\webhooks\LINGYUN.Abp.Webhooks.EventBus\LINGYUN.Abp.Webhooks.EventBus.csproj", "{65951546-93DB-4415-94C5-2B7B1E232A3E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.WebhooksManagement.EntityFrameworkCore", "migrations\LY.MicroService.WebhooksManagement.EntityFrameworkCore\LY.MicroService.WebhooksManagement.EntityFrameworkCore.csproj", "{E41F9F32-7A18-485D-BAAE-D858F7EE72E7}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webhooks", "webhooks", "{E93F5D2E-14FF-47A0-B899-0E34AFDBCCBD}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Notifications", "modules\identity\LINGYUN.Abp.Identity.Notifications\LINGYUN.Abp.Identity.Notifications.csproj", "{54BBA043-317B-4A4F-B583-513D08BC25A7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -1964,118 +1912,34 @@ Global
{8A255A72-50FC-460E-9897-FA53F455580B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A255A72-50FC-460E-9897-FA53F455580B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A255A72-50FC-460E-9897-FA53F455580B}.Release|Any CPU.Build.0 = Release|Any CPU
- {46038910-8EDD-4822-8768-097B7D276FED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {46038910-8EDD-4822-8768-097B7D276FED}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {46038910-8EDD-4822-8768-097B7D276FED}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {46038910-8EDD-4822-8768-097B7D276FED}.Release|Any CPU.Build.0 = Release|Any CPU
- {332F2031-6B67-4199-8BA4-317679D2FFF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {332F2031-6B67-4199-8BA4-317679D2FFF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {332F2031-6B67-4199-8BA4-317679D2FFF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {332F2031-6B67-4199-8BA4-317679D2FFF8}.Release|Any CPU.Build.0 = Release|Any CPU
- {C8138D8C-BF2B-41CB-BEA2-3ACC5E70E306}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C8138D8C-BF2B-41CB-BEA2-3ACC5E70E306}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C8138D8C-BF2B-41CB-BEA2-3ACC5E70E306}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C8138D8C-BF2B-41CB-BEA2-3ACC5E70E306}.Release|Any CPU.Build.0 = Release|Any CPU
- {FF53669D-560C-4791-BE9A-28231C15FA4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FF53669D-560C-4791-BE9A-28231C15FA4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FF53669D-560C-4791-BE9A-28231C15FA4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FF53669D-560C-4791-BE9A-28231C15FA4E}.Release|Any CPU.Build.0 = Release|Any CPU
- {2F8BB49E-92E5-4468-8656-BD4BC03FA505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2F8BB49E-92E5-4468-8656-BD4BC03FA505}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2F8BB49E-92E5-4468-8656-BD4BC03FA505}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2F8BB49E-92E5-4468-8656-BD4BC03FA505}.Release|Any CPU.Build.0 = Release|Any CPU
- {5CAC42F1-58A4-4716-B8E5-E28042D1B612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5CAC42F1-58A4-4716-B8E5-E28042D1B612}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5CAC42F1-58A4-4716-B8E5-E28042D1B612}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5CAC42F1-58A4-4716-B8E5-E28042D1B612}.Release|Any CPU.Build.0 = Release|Any CPU
- {7D235CB7-EC8E-418F-978A-D2E6EA5F9E9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7D235CB7-EC8E-418F-978A-D2E6EA5F9E9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7D235CB7-EC8E-418F-978A-D2E6EA5F9E9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7D235CB7-EC8E-418F-978A-D2E6EA5F9E9A}.Release|Any CPU.Build.0 = Release|Any CPU
- {F78B0978-4ECF-4EA3-89A7-9492AE33CB30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F78B0978-4ECF-4EA3-89A7-9492AE33CB30}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F78B0978-4ECF-4EA3-89A7-9492AE33CB30}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F78B0978-4ECF-4EA3-89A7-9492AE33CB30}.Release|Any CPU.Build.0 = Release|Any CPU
- {7C1A3331-D3D0-4CF0-A7D4-9E27F507AB02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7C1A3331-D3D0-4CF0-A7D4-9E27F507AB02}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7C1A3331-D3D0-4CF0-A7D4-9E27F507AB02}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7C1A3331-D3D0-4CF0-A7D4-9E27F507AB02}.Release|Any CPU.Build.0 = Release|Any CPU
- {DC4AB835-76CA-4439-9A14-473B3838F856}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DC4AB835-76CA-4439-9A14-473B3838F856}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DC4AB835-76CA-4439-9A14-473B3838F856}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DC4AB835-76CA-4439-9A14-473B3838F856}.Release|Any CPU.Build.0 = Release|Any CPU
- {3310571F-1B30-49A4-AD24-0CF5C91C58F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3310571F-1B30-49A4-AD24-0CF5C91C58F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3310571F-1B30-49A4-AD24-0CF5C91C58F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3310571F-1B30-49A4-AD24-0CF5C91C58F7}.Release|Any CPU.Build.0 = Release|Any CPU
- {00C8A2BC-361D-4999-AEC3-BA4DD7991A9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {00C8A2BC-361D-4999-AEC3-BA4DD7991A9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {00C8A2BC-361D-4999-AEC3-BA4DD7991A9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {00C8A2BC-361D-4999-AEC3-BA4DD7991A9D}.Release|Any CPU.Build.0 = Release|Any CPU
- {D60CF8FB-45BB-4F95-97EB-E1CE54B3105A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D60CF8FB-45BB-4F95-97EB-E1CE54B3105A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D60CF8FB-45BB-4F95-97EB-E1CE54B3105A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D60CF8FB-45BB-4F95-97EB-E1CE54B3105A}.Release|Any CPU.Build.0 = Release|Any CPU
- {7D83C686-7BF0-4037-B927-A502D55D01F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7D83C686-7BF0-4037-B927-A502D55D01F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7D83C686-7BF0-4037-B927-A502D55D01F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7D83C686-7BF0-4037-B927-A502D55D01F8}.Release|Any CPU.Build.0 = Release|Any CPU
- {C7F7F9E2-F877-4658-BFEC-E47AE27B0139}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C7F7F9E2-F877-4658-BFEC-E47AE27B0139}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C7F7F9E2-F877-4658-BFEC-E47AE27B0139}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C7F7F9E2-F877-4658-BFEC-E47AE27B0139}.Release|Any CPU.Build.0 = Release|Any CPU
- {2BC04B60-6959-47FF-8860-96AB51986584}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2BC04B60-6959-47FF-8860-96AB51986584}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2BC04B60-6959-47FF-8860-96AB51986584}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2BC04B60-6959-47FF-8860-96AB51986584}.Release|Any CPU.Build.0 = Release|Any CPU
- {1752BAA2-4305-4655-99B4-6832E2CE6CAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1752BAA2-4305-4655-99B4-6832E2CE6CAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1752BAA2-4305-4655-99B4-6832E2CE6CAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1752BAA2-4305-4655-99B4-6832E2CE6CAF}.Release|Any CPU.Build.0 = Release|Any CPU
- {6F2A09CE-183E-4FBA-BB12-DD6105B90B00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6F2A09CE-183E-4FBA-BB12-DD6105B90B00}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6F2A09CE-183E-4FBA-BB12-DD6105B90B00}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6F2A09CE-183E-4FBA-BB12-DD6105B90B00}.Release|Any CPU.Build.0 = Release|Any CPU
- {5E3E2B57-4BF1-45A7-9BAE-EDA000F27C80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5E3E2B57-4BF1-45A7-9BAE-EDA000F27C80}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5E3E2B57-4BF1-45A7-9BAE-EDA000F27C80}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5E3E2B57-4BF1-45A7-9BAE-EDA000F27C80}.Release|Any CPU.Build.0 = Release|Any CPU
- {7D760508-A5A8-44D9-8958-F5AD5F1B7949}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7D760508-A5A8-44D9-8958-F5AD5F1B7949}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7D760508-A5A8-44D9-8958-F5AD5F1B7949}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7D760508-A5A8-44D9-8958-F5AD5F1B7949}.Release|Any CPU.Build.0 = Release|Any CPU
- {2D3B6C77-465E-4D39-A83D-47E74F14D6D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2D3B6C77-465E-4D39-A83D-47E74F14D6D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2D3B6C77-465E-4D39-A83D-47E74F14D6D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2D3B6C77-465E-4D39-A83D-47E74F14D6D0}.Release|Any CPU.Build.0 = Release|Any CPU
- {E8139252-2F6D-437D-97C7-6FB77C705E58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E8139252-2F6D-437D-97C7-6FB77C705E58}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E8139252-2F6D-437D-97C7-6FB77C705E58}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E8139252-2F6D-437D-97C7-6FB77C705E58}.Release|Any CPU.Build.0 = Release|Any CPU
- {40FEF2F7-BB0E-4192-89EE-BDA98B3E4007}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {40FEF2F7-BB0E-4192-89EE-BDA98B3E4007}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {40FEF2F7-BB0E-4192-89EE-BDA98B3E4007}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {40FEF2F7-BB0E-4192-89EE-BDA98B3E4007}.Release|Any CPU.Build.0 = Release|Any CPU
- {CE309DF2-FB96-4917-9DC6-14DC1DED7EED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CE309DF2-FB96-4917-9DC6-14DC1DED7EED}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CE309DF2-FB96-4917-9DC6-14DC1DED7EED}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CE309DF2-FB96-4917-9DC6-14DC1DED7EED}.Release|Any CPU.Build.0 = Release|Any CPU
- {27505FC3-2659-40CC-A9C7-0857FBECE099}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {27505FC3-2659-40CC-A9C7-0857FBECE099}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {27505FC3-2659-40CC-A9C7-0857FBECE099}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {27505FC3-2659-40CC-A9C7-0857FBECE099}.Release|Any CPU.Build.0 = Release|Any CPU
- {1E6F9CF8-577C-45A7-A2E0-2BB3C40AFB9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1E6F9CF8-577C-45A7-A2E0-2BB3C40AFB9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1E6F9CF8-577C-45A7-A2E0-2BB3C40AFB9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1E6F9CF8-577C-45A7-A2E0-2BB3C40AFB9D}.Release|Any CPU.Build.0 = Release|Any CPU
- {65951546-93DB-4415-94C5-2B7B1E232A3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {65951546-93DB-4415-94C5-2B7B1E232A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {65951546-93DB-4415-94C5-2B7B1E232A3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {65951546-93DB-4415-94C5-2B7B1E232A3E}.Release|Any CPU.Build.0 = Release|Any CPU
- {E41F9F32-7A18-485D-BAAE-D858F7EE72E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E41F9F32-7A18-485D-BAAE-D858F7EE72E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E41F9F32-7A18-485D-BAAE-D858F7EE72E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E41F9F32-7A18-485D-BAAE-D858F7EE72E7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CED33625-A034-475B-A4C0-A4E7D1BADD10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CED33625-A034-475B-A4C0-A4E7D1BADD10}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CED33625-A034-475B-A4C0-A4E7D1BADD10}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CED33625-A034-475B-A4C0-A4E7D1BADD10}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E3BA2413-5755-4F61-9A7C-5D49AE9E7016}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E3BA2413-5755-4F61-9A7C-5D49AE9E7016}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E3BA2413-5755-4F61-9A7C-5D49AE9E7016}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E3BA2413-5755-4F61-9A7C-5D49AE9E7016}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BF85DB7F-70C2-4804-AA57-FACE204981DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BF85DB7F-70C2-4804-AA57-FACE204981DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BF85DB7F-70C2-4804-AA57-FACE204981DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BF85DB7F-70C2-4804-AA57-FACE204981DA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {893F7376-0913-43DC-AD3D-40AF5B8F9E3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {893F7376-0913-43DC-AD3D-40AF5B8F9E3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {893F7376-0913-43DC-AD3D-40AF5B8F9E3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {893F7376-0913-43DC-AD3D-40AF5B8F9E3B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8826831D-8733-473A-B47B-A30C3732B13D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8826831D-8733-473A-B47B-A30C3732B13D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8826831D-8733-473A-B47B-A30C3732B13D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8826831D-8733-473A-B47B-A30C3732B13D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D1484DD3-BB0A-45A4-BED5-FFA132DE2E72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D1484DD3-BB0A-45A4-BED5-FFA132DE2E72}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D1484DD3-BB0A-45A4-BED5-FFA132DE2E72}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D1484DD3-BB0A-45A4-BED5-FFA132DE2E72}.Release|Any CPU.Build.0 = Release|Any CPU
+ {54BBA043-317B-4A4F-B583-513D08BC25A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {54BBA043-317B-4A4F-B583-513D08BC25A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {54BBA043-317B-4A4F-B583-513D08BC25A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {54BBA043-317B-4A4F-B583-513D08BC25A7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -2435,39 +2299,13 @@ Global
{ED3DF100-C5DB-4334-A847-118922B28D95} = {3C7A8246-DE82-4330-8697-24EF1B1C515D}
{15482834-9242-4D20-9736-9DA571A9A83A} = {ABD89F39-62D9-439E-8662-BE4F36BFA04F}
{8A255A72-50FC-460E-9897-FA53F455580B} = {9D1302BE-3886-49F8-B0CD-35D2AC1E5A37}
- {46038910-8EDD-4822-8768-097B7D276FED} = {DD9BE9E7-F6BF-4869-BCD2-82F5072BDA21}
- {332F2031-6B67-4199-8BA4-317679D2FFF8} = {77ED7922-BF30-4436-8A85-78F812583913}
- {C8138D8C-BF2B-41CB-BEA2-3ACC5E70E306} = {77ED7922-BF30-4436-8A85-78F812583913}
- {FF53669D-560C-4791-BE9A-28231C15FA4E} = {77ED7922-BF30-4436-8A85-78F812583913}
- {2F8BB49E-92E5-4468-8656-BD4BC03FA505} = {77ED7922-BF30-4436-8A85-78F812583913}
- {5CAC42F1-58A4-4716-B8E5-E28042D1B612} = {77ED7922-BF30-4436-8A85-78F812583913}
- {7D235CB7-EC8E-418F-978A-D2E6EA5F9E9A} = {77ED7922-BF30-4436-8A85-78F812583913}
- {F78B0978-4ECF-4EA3-89A7-9492AE33CB30} = {77ED7922-BF30-4436-8A85-78F812583913}
- {7C1A3331-D3D0-4CF0-A7D4-9E27F507AB02} = {77ED7922-BF30-4436-8A85-78F812583913}
- {DC4AB835-76CA-4439-9A14-473B3838F856} = {77ED7922-BF30-4436-8A85-78F812583913}
- {3310571F-1B30-49A4-AD24-0CF5C91C58F7} = {77ED7922-BF30-4436-8A85-78F812583913}
- {00C8A2BC-361D-4999-AEC3-BA4DD7991A9D} = {77ED7922-BF30-4436-8A85-78F812583913}
- {D60CF8FB-45BB-4F95-97EB-E1CE54B3105A} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {7D83C686-7BF0-4037-B927-A502D55D01F8} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {C7F7F9E2-F877-4658-BFEC-E47AE27B0139} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {2BC04B60-6959-47FF-8860-96AB51986584} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {1752BAA2-4305-4655-99B4-6832E2CE6CAF} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {6F2A09CE-183E-4FBA-BB12-DD6105B90B00} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {5E3E2B57-4BF1-45A7-9BAE-EDA000F27C80} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {C1EFDD32-5524-4DDD-9925-88B6E3530994} = {672E1170-7B18-474B-85C7-1961BF2A48AE}
- {7D760508-A5A8-44D9-8958-F5AD5F1B7949} = {C1EFDD32-5524-4DDD-9925-88B6E3530994}
- {0107020D-22E5-4DDF-8A62-5DE850BA6C79} = {672E1170-7B18-474B-85C7-1961BF2A48AE}
- {74319001-6F4B-41D9-BE32-128EC12AB10B} = {672E1170-7B18-474B-85C7-1961BF2A48AE}
- {2D3B6C77-465E-4D39-A83D-47E74F14D6D0} = {0107020D-22E5-4DDF-8A62-5DE850BA6C79}
- {E8139252-2F6D-437D-97C7-6FB77C705E58} = {74319001-6F4B-41D9-BE32-128EC12AB10B}
- {40FEF2F7-BB0E-4192-89EE-BDA98B3E4007} = {77ED7922-BF30-4436-8A85-78F812583913}
- {A922E0EE-5302-4E2B-9D84-0EC681416DA2} = {C90A505F-000E-4AE4-8CCD-AB5FE5092B5C}
- {CE309DF2-FB96-4917-9DC6-14DC1DED7EED} = {A922E0EE-5302-4E2B-9D84-0EC681416DA2}
- {27505FC3-2659-40CC-A9C7-0857FBECE099} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {1E6F9CF8-577C-45A7-A2E0-2BB3C40AFB9D} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {65951546-93DB-4415-94C5-2B7B1E232A3E} = {13ACF670-F109-404E-B252-2FA34A4EA061}
- {E93F5D2E-14FF-47A0-B899-0E34AFDBCCBD} = {C90A505F-000E-4AE4-8CCD-AB5FE5092B5C}
- {E41F9F32-7A18-485D-BAAE-D858F7EE72E7} = {E93F5D2E-14FF-47A0-B899-0E34AFDBCCBD}
+ {CED33625-A034-475B-A4C0-A4E7D1BADD10} = {DD9BE9E7-F6BF-4869-BCD2-82F5072BDA21}
+ {E3BA2413-5755-4F61-9A7C-5D49AE9E7016} = {52B5D4F7-237B-4E0A-A167-68442164F70A}
+ {BF85DB7F-70C2-4804-AA57-FACE204981DA} = {52B5D4F7-237B-4E0A-A167-68442164F70A}
+ {893F7376-0913-43DC-AD3D-40AF5B8F9E3B} = {0439B173-F41E-4CE0-A44A-CCB70328F272}
+ {8826831D-8733-473A-B47B-A30C3732B13D} = {52B5D4F7-237B-4E0A-A167-68442164F70A}
+ {D1484DD3-BB0A-45A4-BED5-FFA132DE2E72} = {83E698F6-F8CD-4604-AB80-01A203389501}
+ {54BBA043-317B-4A4F-B583-513D08BC25A7} = {52B5D4F7-237B-4E0A-A167-68442164F70A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718}
diff --git a/aspnet-core/LINGYUN.MicroService.SingleProject.sln b/aspnet-core/LINGYUN.MicroService.SingleProject.sln
index ea8e6b660..0e6fe18c1 100644
--- a/aspnet-core/LINGYUN.MicroService.SingleProject.sln
+++ b/aspnet-core/LINGYUN.MicroService.SingleProject.sln
@@ -515,6 +515,24 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackgroundTasks
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Saas.Jobs", "modules\saas\LINGYUN.Abp.Saas.Jobs\LINGYUN.Abp.Saas.Jobs.csproj", "{8FA3ED81-19AB-4E0C-B36A-DF49131A2AB3}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IdentityServer.SmsValidator", "modules\identityServer\LINGYUN.Abp.IdentityServer.SmsValidator\LINGYUN.Abp.IdentityServer.SmsValidator.csproj", "{7C1A8FF7-9FD1-41FC-856D-7A2DC6F7CE6F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IdentityServer.Portal", "modules\identityServer\LINGYUN.Abp.IdentityServer.Portal\LINGYUN.Abp.IdentityServer.Portal.csproj", "{986B92F6-A758-4D1F-8BC7-BFD13FF38591}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IdentityServer.WeChat.Work", "modules\identityServer\LINGYUN.Abp.IdentityServer.WeChat.Work\LINGYUN.Abp.IdentityServer.WeChat.Work.csproj", "{62D72C3E-5C57-439D-B7F7-5C55CC384A7A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Session", "modules\identity\LINGYUN.Abp.Identity.Session\LINGYUN.Abp.Identity.Session.csproj", "{74156CFF-C236-4DED-B810-FAD8948F51CA}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Session.AspNetCore", "modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj", "{63D08153-B43C-4884-8818-4AB42E1FEE75}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.AspNetCore.Session", "modules\identity\LINGYUN.Abp.Identity.AspNetCore.Session\LINGYUN.Abp.Identity.AspNetCore.Session.csproj", "{AF02868C-283E-4CB2-8866-3B0CAD1BB2DE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IdentityServer.Session", "modules\identityServer\LINGYUN.Abp.IdentityServer.Session\LINGYUN.Abp.IdentityServer.Session.csproj", "{F7459720-873C-4741-A991-A671CF03A6AF}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OpenIddict.AspNetCore.Session", "modules\openIddict\LINGYUN.Abp.OpenIddict.AspNetCore.Session\LINGYUN.Abp.OpenIddict.AspNetCore.Session.csproj", "{382CAC43-EE1F-4DA3-B433-E23C3F58F44A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Notifications", "modules\identity\LINGYUN.Abp.Identity.Notifications\LINGYUN.Abp.Identity.Notifications.csproj", "{4634B421-36E6-4169-AA1A-11050902495F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1349,6 +1367,42 @@ Global
{8FA3ED81-19AB-4E0C-B36A-DF49131A2AB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FA3ED81-19AB-4E0C-B36A-DF49131A2AB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FA3ED81-19AB-4E0C-B36A-DF49131A2AB3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7C1A8FF7-9FD1-41FC-856D-7A2DC6F7CE6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7C1A8FF7-9FD1-41FC-856D-7A2DC6F7CE6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7C1A8FF7-9FD1-41FC-856D-7A2DC6F7CE6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7C1A8FF7-9FD1-41FC-856D-7A2DC6F7CE6F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {986B92F6-A758-4D1F-8BC7-BFD13FF38591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {986B92F6-A758-4D1F-8BC7-BFD13FF38591}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {986B92F6-A758-4D1F-8BC7-BFD13FF38591}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {986B92F6-A758-4D1F-8BC7-BFD13FF38591}.Release|Any CPU.Build.0 = Release|Any CPU
+ {62D72C3E-5C57-439D-B7F7-5C55CC384A7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {62D72C3E-5C57-439D-B7F7-5C55CC384A7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {62D72C3E-5C57-439D-B7F7-5C55CC384A7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {62D72C3E-5C57-439D-B7F7-5C55CC384A7A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {74156CFF-C236-4DED-B810-FAD8948F51CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {74156CFF-C236-4DED-B810-FAD8948F51CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {74156CFF-C236-4DED-B810-FAD8948F51CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {74156CFF-C236-4DED-B810-FAD8948F51CA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {63D08153-B43C-4884-8818-4AB42E1FEE75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {63D08153-B43C-4884-8818-4AB42E1FEE75}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {63D08153-B43C-4884-8818-4AB42E1FEE75}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {63D08153-B43C-4884-8818-4AB42E1FEE75}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AF02868C-283E-4CB2-8866-3B0CAD1BB2DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AF02868C-283E-4CB2-8866-3B0CAD1BB2DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AF02868C-283E-4CB2-8866-3B0CAD1BB2DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AF02868C-283E-4CB2-8866-3B0CAD1BB2DE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F7459720-873C-4741-A991-A671CF03A6AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F7459720-873C-4741-A991-A671CF03A6AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F7459720-873C-4741-A991-A671CF03A6AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F7459720-873C-4741-A991-A671CF03A6AF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {382CAC43-EE1F-4DA3-B433-E23C3F58F44A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {382CAC43-EE1F-4DA3-B433-E23C3F58F44A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {382CAC43-EE1F-4DA3-B433-E23C3F58F44A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {382CAC43-EE1F-4DA3-B433-E23C3F58F44A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4634B421-36E6-4169-AA1A-11050902495F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4634B421-36E6-4169-AA1A-11050902495F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4634B421-36E6-4169-AA1A-11050902495F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4634B421-36E6-4169-AA1A-11050902495F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1600,6 +1654,15 @@ Global
{66A6E78D-E547-4DD7-9844-087FAB3D03C2} = {C22741F9-FC56-4AE3-B543-9F15C779D345}
{A99F5406-37DC-4677-9166-9BDE90C26CA6} = {D9C65C9D-8591-46DA-A3EE-419393E607AB}
{8FA3ED81-19AB-4E0C-B36A-DF49131A2AB3} = {0DF5AD76-AEEA-4052-A6CA-A44C24879F11}
+ {7C1A8FF7-9FD1-41FC-856D-7A2DC6F7CE6F} = {A3B6DFC3-5D27-496E-9AD6-C1035213F1DC}
+ {986B92F6-A758-4D1F-8BC7-BFD13FF38591} = {A3B6DFC3-5D27-496E-9AD6-C1035213F1DC}
+ {62D72C3E-5C57-439D-B7F7-5C55CC384A7A} = {A3B6DFC3-5D27-496E-9AD6-C1035213F1DC}
+ {74156CFF-C236-4DED-B810-FAD8948F51CA} = {D94D6AFE-20BD-4F21-8708-03F5E34F49FC}
+ {63D08153-B43C-4884-8818-4AB42E1FEE75} = {D94D6AFE-20BD-4F21-8708-03F5E34F49FC}
+ {AF02868C-283E-4CB2-8866-3B0CAD1BB2DE} = {D94D6AFE-20BD-4F21-8708-03F5E34F49FC}
+ {F7459720-873C-4741-A991-A671CF03A6AF} = {A3B6DFC3-5D27-496E-9AD6-C1035213F1DC}
+ {382CAC43-EE1F-4DA3-B433-E23C3F58F44A} = {7C714185-D3D9-4D94-B5CB-D857A0091F04}
+ {4634B421-36E6-4169-AA1A-11050902495F} = {D94D6AFE-20BD-4F21-8708-03F5E34F49FC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1}
diff --git a/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln b/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln
index a4d2c8475..e29bffbc2 100644
--- a/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln
+++ b/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln
@@ -147,6 +147,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Security", "fra
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Claims.Mapping", "framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj", "{047F892F-F8D2-4952-A1E9-93AA2B030F76}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "identity", "identity", "{23E99204-F7C1-47BA-84CD-3C9D05210F4F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Session", "modules\identity\LINGYUN.Abp.Identity.Session\LINGYUN.Abp.Identity.Session.csproj", "{BF298DF5-BC1D-4DDD-A51E-8E9020D2C5F1}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Session.AspNetCore", "modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj", "{BE58649C-EA57-4DFC-8D25-54FDCB1943A1}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -381,6 +387,14 @@ Global
{047F892F-F8D2-4952-A1E9-93AA2B030F76}.Debug|Any CPU.Build.0 = Debug|Any CPU
{047F892F-F8D2-4952-A1E9-93AA2B030F76}.Release|Any CPU.ActiveCfg = Release|Any CPU
{047F892F-F8D2-4952-A1E9-93AA2B030F76}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BF298DF5-BC1D-4DDD-A51E-8E9020D2C5F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BF298DF5-BC1D-4DDD-A51E-8E9020D2C5F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BF298DF5-BC1D-4DDD-A51E-8E9020D2C5F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BF298DF5-BC1D-4DDD-A51E-8E9020D2C5F1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BE58649C-EA57-4DFC-8D25-54FDCB1943A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BE58649C-EA57-4DFC-8D25-54FDCB1943A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BE58649C-EA57-4DFC-8D25-54FDCB1943A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BE58649C-EA57-4DFC-8D25-54FDCB1943A1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -454,6 +468,9 @@ Global
{0DFDAC71-BCB9-44CF-A44A-E8288E75246F} = {FB7A9794-06D2-42CF-939E-4626497B97BD}
{8F11DADB-557A-4ECF-BEBB-19AFA71998A1} = {FB7A9794-06D2-42CF-939E-4626497B97BD}
{047F892F-F8D2-4952-A1E9-93AA2B030F76} = {FB7A9794-06D2-42CF-939E-4626497B97BD}
+ {23E99204-F7C1-47BA-84CD-3C9D05210F4F} = {03B4B0AA-83CE-4E4B-9CE2-47369BF88B97}
+ {BF298DF5-BC1D-4DDD-A51E-8E9020D2C5F1} = {23E99204-F7C1-47BA-84CD-3C9D05210F4F}
+ {BE58649C-EA57-4DFC-8D25-54FDCB1943A1} = {23E99204-F7C1-47BA-84CD-3C9D05210F4F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {80ED12A5-C899-459F-A181-ADCC9D680DE5}
diff --git a/aspnet-core/LINGYUN.MicroService.Workflow.sln b/aspnet-core/LINGYUN.MicroService.Workflow.sln
index 89c50b929..5259391cd 100644
--- a/aspnet-core/LINGYUN.MicroService.Workflow.sln
+++ b/aspnet-core/LINGYUN.MicroService.Workflow.sln
@@ -165,6 +165,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Security", "fra
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Claims.Mapping", "framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj", "{1859E205-88DC-4E08-A0BD-55A045DCC495}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "identity", "identity", "{9C73D4E6-4408-4717-B51C-63C20321D4DA}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Session", "modules\identity\LINGYUN.Abp.Identity.Session\LINGYUN.Abp.Identity.Session.csproj", "{6ECF678D-6F3A-4084-8538-A86C1D67C703}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Session.AspNetCore", "modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj", "{9FB5E943-7F6F-4281-9C00-E76284B4F1F3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -443,6 +449,14 @@ Global
{1859E205-88DC-4E08-A0BD-55A045DCC495}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1859E205-88DC-4E08-A0BD-55A045DCC495}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1859E205-88DC-4E08-A0BD-55A045DCC495}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6ECF678D-6F3A-4084-8538-A86C1D67C703}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6ECF678D-6F3A-4084-8538-A86C1D67C703}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6ECF678D-6F3A-4084-8538-A86C1D67C703}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6ECF678D-6F3A-4084-8538-A86C1D67C703}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9FB5E943-7F6F-4281-9C00-E76284B4F1F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9FB5E943-7F6F-4281-9C00-E76284B4F1F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9FB5E943-7F6F-4281-9C00-E76284B4F1F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9FB5E943-7F6F-4281-9C00-E76284B4F1F3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -518,6 +532,8 @@ Global
{4D055853-DE80-4145-BB2F-33EB6B379F5E} = {6DA78E72-BA55-4ECF-97DB-6258174D3E2A}
{E4783690-052A-4AB0-837E-BDBC77CC7EEC} = {6DA78E72-BA55-4ECF-97DB-6258174D3E2A}
{1859E205-88DC-4E08-A0BD-55A045DCC495} = {6DA78E72-BA55-4ECF-97DB-6258174D3E2A}
+ {6ECF678D-6F3A-4084-8538-A86C1D67C703} = {9C73D4E6-4408-4717-B51C-63C20321D4DA}
+ {9FB5E943-7F6F-4281-9C00-E76284B4F1F3} = {9C73D4E6-4408-4717-B51C-63C20321D4DA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6BB7A5DE-DA12-44DC-BC9B-0F6CA524346F}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN.Abp.AuditLogging.Elasticsearch.csproj b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN.Abp.AuditLogging.Elasticsearch.csproj
index 8eb7367c1..d55edf077 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN.Abp.AuditLogging.Elasticsearch.csproj
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN.Abp.AuditLogging.Elasticsearch.csproj
@@ -4,7 +4,12 @@
- netstandard2.0
+ netstandard2.0;netstandard2.1;net8.0
+ LINGYUN.Abp.AuditLogging.Elasticsearch
+ LINGYUN.Abp.AuditLogging.Elasticsearch
+ false
+ false
+ false
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AbpAuditLoggingElasticsearchModule.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AbpAuditLoggingElasticsearchModule.cs
index 183a1c2f8..d25265666 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AbpAuditLoggingElasticsearchModule.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AbpAuditLoggingElasticsearchModule.cs
@@ -3,20 +3,19 @@
using Volo.Abp.Json;
using Volo.Abp.Modularity;
-namespace LINGYUN.Abp.AuditLogging.Elasticsearch
+namespace LINGYUN.Abp.AuditLogging.Elasticsearch;
+
+[DependsOn(
+ typeof(AbpAuditLoggingModule),
+ typeof(AbpElasticsearchModule),
+ typeof(AbpJsonModule))]
+public class AbpAuditLoggingElasticsearchModule : AbpModule
{
- [DependsOn(
- typeof(AbpAuditLoggingModule),
- typeof(AbpElasticsearchModule),
- typeof(AbpJsonModule))]
- public class AbpAuditLoggingElasticsearchModule : AbpModule
+ public override void ConfigureServices(ServiceConfigurationContext context)
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- var configuration = context.Services.GetConfiguration();
- Configure(configuration.GetSection("AuditLogging:Elasticsearch"));
+ var configuration = context.Services.GetConfiguration();
+ Configure(configuration.GetSection("AuditLogging:Elasticsearch"));
- context.Services.AddHostedService();
- }
+ context.Services.AddHostedService();
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AbpAuditLoggingElasticsearchOptions.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AbpAuditLoggingElasticsearchOptions.cs
index 820499ce7..7773ae201 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AbpAuditLoggingElasticsearchOptions.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AbpAuditLoggingElasticsearchOptions.cs
@@ -1,17 +1,16 @@
using Nest;
-namespace LINGYUN.Abp.AuditLogging.Elasticsearch
+namespace LINGYUN.Abp.AuditLogging.Elasticsearch;
+
+public class AbpAuditLoggingElasticsearchOptions
{
- public class AbpAuditLoggingElasticsearchOptions
- {
- public const string DefaultIndexPrefix = "auditlogging";
- public string IndexPrefix { get; set; }
- public IIndexSettings IndexSettings { get; set; }
+ public const string DefaultIndexPrefix = "auditlogging";
+ public string IndexPrefix { get; set; }
+ public IIndexSettings IndexSettings { get; set; }
- public AbpAuditLoggingElasticsearchOptions()
- {
- IndexPrefix = DefaultIndexPrefix;
- IndexSettings = new IndexSettings();
- }
+ public AbpAuditLoggingElasticsearchOptions()
+ {
+ IndexPrefix = DefaultIndexPrefix;
+ IndexSettings = new IndexSettings();
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AuditLogInfoToAuditLogConverter.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AuditLogInfoToAuditLogConverter.cs
index 0d1688155..f0f331a60 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AuditLogInfoToAuditLogConverter.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AuditLogInfoToAuditLogConverter.cs
@@ -11,105 +11,104 @@
using Volo.Abp.Http;
using Volo.Abp.Json;
-namespace LINGYUN.Abp.AuditLogging
+namespace LINGYUN.Abp.AuditLogging;
+
+public class AuditLogInfoToAuditLogConverter : IAuditLogInfoToAuditLogConverter, ITransientDependency
{
- public class AuditLogInfoToAuditLogConverter : IAuditLogInfoToAuditLogConverter, ITransientDependency
+ protected IGuidGenerator GuidGenerator { get; }
+ protected AbpExceptionHandlingOptions ExceptionHandlingOptions { get; }
+ protected IExceptionToErrorInfoConverter ExceptionToErrorInfoConverter { get; }
+ protected IJsonSerializer JsonSerializer { get; }
+
+ public AuditLogInfoToAuditLogConverter(
+ IGuidGenerator guidGenerator,
+ IOptions exceptionHandlingOptions,
+ IExceptionToErrorInfoConverter exceptionToErrorInfoConverter,
+ IJsonSerializer jsonSerializer)
{
- protected IGuidGenerator GuidGenerator { get; }
- protected AbpExceptionHandlingOptions ExceptionHandlingOptions { get; }
- protected IExceptionToErrorInfoConverter ExceptionToErrorInfoConverter { get; }
- protected IJsonSerializer JsonSerializer { get; }
+ GuidGenerator = guidGenerator;
+ ExceptionHandlingOptions = exceptionHandlingOptions.Value;
+ ExceptionToErrorInfoConverter = exceptionToErrorInfoConverter;
+ JsonSerializer = jsonSerializer;
+ }
- public AuditLogInfoToAuditLogConverter(
- IGuidGenerator guidGenerator,
- IOptions exceptionHandlingOptions,
- IExceptionToErrorInfoConverter exceptionToErrorInfoConverter,
- IJsonSerializer jsonSerializer)
- {
- GuidGenerator = guidGenerator;
- ExceptionHandlingOptions = exceptionHandlingOptions.Value;
- ExceptionToErrorInfoConverter = exceptionToErrorInfoConverter;
- JsonSerializer = jsonSerializer;
- }
+ public virtual Task ConvertAsync(AuditLogInfo auditLogInfo)
+ {
+ var auditLogId = GuidGenerator.Create();
- public virtual Task ConvertAsync(AuditLogInfo auditLogInfo)
+ var extraProperties = new ExtraPropertyDictionary();
+ if (auditLogInfo.ExtraProperties != null)
{
- var auditLogId = GuidGenerator.Create();
-
- var extraProperties = new ExtraPropertyDictionary();
- if (auditLogInfo.ExtraProperties != null)
+ foreach (var pair in auditLogInfo.ExtraProperties)
{
- foreach (var pair in auditLogInfo.ExtraProperties)
- {
- extraProperties.Add(pair.Key, pair.Value);
- }
+ extraProperties.Add(pair.Key, pair.Value);
}
+ }
- var entityChanges = auditLogInfo
- .EntityChanges?
- .Select(entityChangeInfo => new EntityChange(
- GuidGenerator,
- auditLogId,
- entityChangeInfo,
- tenantId: auditLogInfo.TenantId,
- entityTenantId: entityChangeInfo.EntityTenantId))
- .ToList()
- ?? new List();
+ var entityChanges = auditLogInfo
+ .EntityChanges?
+ .Select(entityChangeInfo => new EntityChange(
+ GuidGenerator,
+ auditLogId,
+ entityChangeInfo,
+ tenantId: auditLogInfo.TenantId,
+ entityTenantId: entityChangeInfo.EntityTenantId))
+ .ToList()
+ ?? new List();
- var actions = auditLogInfo
- .Actions?
- .Select(auditLogActionInfo => new AuditLogAction(
- GuidGenerator.Create(),
- auditLogId,
- auditLogActionInfo,
- tenantId: auditLogInfo.TenantId))
- .ToList()
- ?? new List();
+ var actions = auditLogInfo
+ .Actions?
+ .Select(auditLogActionInfo => new AuditLogAction(
+ GuidGenerator.Create(),
+ auditLogId,
+ auditLogActionInfo,
+ tenantId: auditLogInfo.TenantId))
+ .ToList()
+ ?? new List();
- var remoteServiceErrorInfos = auditLogInfo.Exceptions?.Select(exception =>
- ExceptionToErrorInfoConverter.Convert(exception, options =>
- {
- options.SendExceptionsDetailsToClients = ExceptionHandlingOptions.SendExceptionsDetailsToClients;
- options.SendStackTraceToClients = ExceptionHandlingOptions.SendStackTraceToClients;
- })) ?? new List();
+ var remoteServiceErrorInfos = auditLogInfo.Exceptions?.Select(exception =>
+ ExceptionToErrorInfoConverter.Convert(exception, options =>
+ {
+ options.SendExceptionsDetailsToClients = ExceptionHandlingOptions.SendExceptionsDetailsToClients;
+ options.SendStackTraceToClients = ExceptionHandlingOptions.SendStackTraceToClients;
+ })) ?? new List();
- var exceptions = remoteServiceErrorInfos.Any()
- ? JsonSerializer.Serialize(remoteServiceErrorInfos, indented: true)
- : null;
+ var exceptions = remoteServiceErrorInfos.Any()
+ ? JsonSerializer.Serialize(remoteServiceErrorInfos, indented: true)
+ : null;
- var comments = auditLogInfo
- .Comments?
- .JoinAsString(Environment.NewLine);
+ var comments = auditLogInfo
+ .Comments?
+ .JoinAsString(Environment.NewLine);
- var auditLog = new AuditLog(
- auditLogId,
- auditLogInfo.ApplicationName,
- auditLogInfo.TenantId,
- auditLogInfo.TenantName,
- auditLogInfo.UserId,
- auditLogInfo.UserName,
- auditLogInfo.ExecutionTime,
- auditLogInfo.ExecutionDuration,
- auditLogInfo.ClientIpAddress,
- auditLogInfo.ClientName,
- auditLogInfo.ClientId,
- auditLogInfo.CorrelationId,
- auditLogInfo.BrowserInfo,
- auditLogInfo.HttpMethod,
- auditLogInfo.Url,
- auditLogInfo.HttpStatusCode,
- auditLogInfo.ImpersonatorUserId,
- auditLogInfo.ImpersonatorUserName,
- auditLogInfo.ImpersonatorTenantId,
- auditLogInfo.ImpersonatorTenantName,
- extraProperties,
- entityChanges,
- actions,
- exceptions,
- comments
- );
+ var auditLog = new AuditLog(
+ auditLogId,
+ auditLogInfo.ApplicationName,
+ auditLogInfo.TenantId,
+ auditLogInfo.TenantName,
+ auditLogInfo.UserId,
+ auditLogInfo.UserName,
+ auditLogInfo.ExecutionTime,
+ auditLogInfo.ExecutionDuration,
+ auditLogInfo.ClientIpAddress,
+ auditLogInfo.ClientName,
+ auditLogInfo.ClientId,
+ auditLogInfo.CorrelationId,
+ auditLogInfo.BrowserInfo,
+ auditLogInfo.HttpMethod,
+ auditLogInfo.Url,
+ auditLogInfo.HttpStatusCode,
+ auditLogInfo.ImpersonatorUserId,
+ auditLogInfo.ImpersonatorUserName,
+ auditLogInfo.ImpersonatorTenantId,
+ auditLogInfo.ImpersonatorTenantName,
+ extraProperties,
+ entityChanges,
+ actions,
+ exceptions,
+ comments
+ );
- return Task.FromResult(auditLog);
- }
+ return Task.FromResult(auditLog);
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs
index 711079643..c82208cfe 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs
@@ -13,361 +13,360 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Timing;
-namespace LINGYUN.Abp.AuditLogging.Elasticsearch
+namespace LINGYUN.Abp.AuditLogging.Elasticsearch;
+
+[Dependency(ReplaceServices = true)]
+public class ElasticsearchAuditLogManager : IAuditLogManager, ITransientDependency
{
- [Dependency(ReplaceServices = true)]
- public class ElasticsearchAuditLogManager : IAuditLogManager, ITransientDependency
+ private readonly AbpAuditingOptions _auditingOptions;
+ private readonly AbpElasticsearchOptions _elasticsearchOptions;
+ private readonly IIndexNameNormalizer _indexNameNormalizer;
+ private readonly IElasticsearchClientFactory _clientFactory;
+ private readonly IAuditLogInfoToAuditLogConverter _converter;
+ private readonly IClock _clock;
+
+ public ILogger Logger { protected get; set; }
+
+ public ElasticsearchAuditLogManager(
+ IClock clock,
+ IIndexNameNormalizer indexNameNormalizer,
+ IOptions elasticsearchOptions,
+ IElasticsearchClientFactory clientFactory,
+ IOptions auditingOptions,
+ IAuditLogInfoToAuditLogConverter converter)
{
- private readonly AbpAuditingOptions _auditingOptions;
- private readonly AbpElasticsearchOptions _elasticsearchOptions;
- private readonly IIndexNameNormalizer _indexNameNormalizer;
- private readonly IElasticsearchClientFactory _clientFactory;
- private readonly IAuditLogInfoToAuditLogConverter _converter;
- private readonly IClock _clock;
-
- public ILogger Logger { protected get; set; }
-
- public ElasticsearchAuditLogManager(
- IClock clock,
- IIndexNameNormalizer indexNameNormalizer,
- IOptions elasticsearchOptions,
- IElasticsearchClientFactory clientFactory,
- IOptions auditingOptions,
- IAuditLogInfoToAuditLogConverter converter)
- {
- _clock = clock;
- _converter = converter;
- _clientFactory = clientFactory;
- _auditingOptions = auditingOptions.Value;
- _elasticsearchOptions = elasticsearchOptions.Value;
- _indexNameNormalizer = indexNameNormalizer;
-
- Logger = NullLogger.Instance;
- }
+ _clock = clock;
+ _converter = converter;
+ _clientFactory = clientFactory;
+ _auditingOptions = auditingOptions.Value;
+ _elasticsearchOptions = elasticsearchOptions.Value;
+ _indexNameNormalizer = indexNameNormalizer;
+
+ Logger = NullLogger.Instance;
+ }
- public async virtual Task GetCountAsync(
- DateTime? startTime = null,
- DateTime? endTime = null,
- string httpMethod = null,
- string url = null,
- Guid? userId = null,
- string userName = null,
- string applicationName = null,
- string correlationId = null,
- string clientId = null,
- string clientIpAddress = null,
- int? maxExecutionDuration = null,
- int? minExecutionDuration = null,
- bool? hasException = null,
- HttpStatusCode? httpStatusCode = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- var client = _clientFactory.Create();
-
- var querys = BuildQueryDescriptor(
- startTime,
- endTime,
- httpMethod,
- url,
- userId,
- userName,
- applicationName,
- correlationId,
- clientId,
- clientIpAddress,
- maxExecutionDuration,
- minExecutionDuration,
- hasException,
- httpStatusCode);
-
- var response = await client.CountAsync(dsl =>
- dsl.Index(CreateIndex())
- .Query(log => log.Bool(b => b.Must(querys.ToArray()))),
- cancellationToken);
-
- return response.Count;
- }
+ public async virtual Task GetCountAsync(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string httpMethod = null,
+ string url = null,
+ Guid? userId = null,
+ string userName = null,
+ string applicationName = null,
+ string correlationId = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ int? maxExecutionDuration = null,
+ int? minExecutionDuration = null,
+ bool? hasException = null,
+ HttpStatusCode? httpStatusCode = null,
+ CancellationToken cancellationToken = default)
+ {
+ var client = _clientFactory.Create();
+
+ var querys = BuildQueryDescriptor(
+ startTime,
+ endTime,
+ httpMethod,
+ url,
+ userId,
+ userName,
+ applicationName,
+ correlationId,
+ clientId,
+ clientIpAddress,
+ maxExecutionDuration,
+ minExecutionDuration,
+ hasException,
+ httpStatusCode);
+
+ var response = await client.CountAsync(dsl =>
+ dsl.Index(CreateIndex())
+ .Query(log => log.Bool(b => b.Must(querys.ToArray()))),
+ cancellationToken);
+
+ return response.Count;
+ }
- public async virtual Task> GetListAsync(
- string sorting = null,
- int maxResultCount = 50,
- int skipCount = 0,
- DateTime? startTime = null,
- DateTime? endTime = null,
- string httpMethod = null,
- string url = null,
- Guid? userId = null,
- string userName = null,
- string applicationName = null,
- string correlationId = null,
- string clientId = null,
- string clientIpAddress = null,
- int? maxExecutionDuration = null,
- int? minExecutionDuration = null,
- bool? hasException = null,
- HttpStatusCode? httpStatusCode = null,
- bool includeDetails = false,
- CancellationToken cancellationToken = default(CancellationToken))
+ public async virtual Task> GetListAsync(
+ string sorting = null,
+ int maxResultCount = 50,
+ int skipCount = 0,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string httpMethod = null,
+ string url = null,
+ Guid? userId = null,
+ string userName = null,
+ string applicationName = null,
+ string correlationId = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ int? maxExecutionDuration = null,
+ int? minExecutionDuration = null,
+ bool? hasException = null,
+ HttpStatusCode? httpStatusCode = null,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ var client = _clientFactory.Create();
+
+ var sortOrder = !sorting.IsNullOrWhiteSpace() && sorting.EndsWith("asc", StringComparison.InvariantCultureIgnoreCase)
+ ? SortOrder.Ascending : SortOrder.Descending;
+ sorting = !sorting.IsNullOrWhiteSpace()
+ ? sorting.Split()[0]
+ : nameof(AuditLog.ExecutionTime);
+
+ var querys = BuildQueryDescriptor(
+ startTime,
+ endTime,
+ httpMethod,
+ url,
+ userId,
+ userName,
+ applicationName,
+ correlationId,
+ clientId,
+ clientIpAddress,
+ maxExecutionDuration,
+ minExecutionDuration,
+ hasException,
+ httpStatusCode);
+
+ SourceFilterDescriptor SourceFilter(SourceFilterDescriptor selector)
{
- var client = _clientFactory.Create();
-
- var sortOrder = !sorting.IsNullOrWhiteSpace() && sorting.EndsWith("asc", StringComparison.InvariantCultureIgnoreCase)
- ? SortOrder.Ascending : SortOrder.Descending;
- sorting = !sorting.IsNullOrWhiteSpace()
- ? sorting.Split()[0]
- : nameof(AuditLog.ExecutionTime);
-
- var querys = BuildQueryDescriptor(
- startTime,
- endTime,
- httpMethod,
- url,
- userId,
- userName,
- applicationName,
- correlationId,
- clientId,
- clientIpAddress,
- maxExecutionDuration,
- minExecutionDuration,
- hasException,
- httpStatusCode);
-
- SourceFilterDescriptor SourceFilter(SourceFilterDescriptor selector)
+ selector.IncludeAll();
+ if (!includeDetails)
{
- selector.IncludeAll();
- if (!includeDetails)
- {
- selector.Excludes(field =>
- field.Field(f => f.Actions)
- .Field(f => f.Comments)
- .Field(f => f.Exceptions)
- .Field(f => f.EntityChanges));
- }
-
- return selector;
+ selector.Excludes(field =>
+ field.Field(f => f.Actions)
+ .Field(f => f.Comments)
+ .Field(f => f.Exceptions)
+ .Field(f => f.EntityChanges));
}
- var response = await client.SearchAsync(dsl =>
- dsl.Index(CreateIndex())
- .Query(log => log.Bool(b => b.Must(querys.ToArray())))
- .Source(SourceFilter)
- .Sort(log => log.Field(GetField(sorting), sortOrder))
- .From(skipCount)
- .Size(maxResultCount),
- cancellationToken);
-
- return response.Documents.ToList();
+ return selector;
}
- public async virtual Task GetAsync(
- Guid id,
- bool includeDetails = false,
- CancellationToken cancellationToken = default)
- {
- var client = _clientFactory.Create();
+ var response = await client.SearchAsync(dsl =>
+ dsl.Index(CreateIndex())
+ .Query(log => log.Bool(b => b.Must(querys.ToArray())))
+ .Source(SourceFilter)
+ .Sort(log => log.Field(GetField(sorting), sortOrder))
+ .From(skipCount)
+ .Size(maxResultCount),
+ cancellationToken);
- var response = await client.GetAsync(
- id,
- dsl =>
- dsl.Index(CreateIndex()),
- cancellationToken);
+ return response.Documents.ToList();
+ }
- return response.Source;
- }
+ public async virtual Task GetAsync(
+ Guid id,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ var client = _clientFactory.Create();
- public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
- {
- var client = _clientFactory.Create();
+ var response = await client.GetAsync(
+ id,
+ dsl =>
+ dsl.Index(CreateIndex()),
+ cancellationToken);
- await client.DeleteAsync(
- id,
- dsl =>
- dsl.Index(CreateIndex()),
- cancellationToken);
- }
+ return response.Source;
+ }
- public async virtual Task SaveAsync(
- AuditLogInfo auditInfo,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- if (!_auditingOptions.HideErrors)
- {
- return await SaveLogAsync(auditInfo, cancellationToken);
- }
+ public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
+ {
+ var client = _clientFactory.Create();
- try
- {
- return await SaveLogAsync(auditInfo, cancellationToken);
- }
- catch (Exception ex)
- {
- Logger.LogWarning("Could not save the audit log object: " + Environment.NewLine + auditInfo.ToString());
- Logger.LogException(ex, Microsoft.Extensions.Logging.LogLevel.Error);
- }
- return "";
+ await client.DeleteAsync(
+ id,
+ dsl =>
+ dsl.Index(CreateIndex()),
+ cancellationToken);
+ }
+
+ public async virtual Task SaveAsync(
+ AuditLogInfo auditInfo,
+ CancellationToken cancellationToken = default)
+ {
+ if (!_auditingOptions.HideErrors)
+ {
+ return await SaveLogAsync(auditInfo, cancellationToken);
}
- protected async virtual Task SaveLogAsync(
- AuditLogInfo auditLogInfo,
- CancellationToken cancellationToken = default(CancellationToken))
+ try
{
- var client = _clientFactory.Create();
+ return await SaveLogAsync(auditInfo, cancellationToken);
+ }
+ catch (Exception ex)
+ {
+ Logger.LogWarning("Could not save the audit log object: " + Environment.NewLine + auditInfo.ToString());
+ Logger.LogException(ex, Microsoft.Extensions.Logging.LogLevel.Error);
+ }
+ return "";
+ }
- var auditLog = await _converter.ConvertAsync(auditLogInfo);
+ protected async virtual Task SaveLogAsync(
+ AuditLogInfo auditLogInfo,
+ CancellationToken cancellationToken = default)
+ {
+ var client = _clientFactory.Create();
- //var response = await client.IndexAsync(
- // auditLog,
- // (x) => x.Index(CreateIndex())
- // .Id(auditLog.Id),
- // cancellationToken);
+ var auditLog = await _converter.ConvertAsync(auditLogInfo);
- // 使用 Bulk 命令传输可能存在参数庞大的日志结构
- var response = await client.BulkAsync(
- dsl => dsl.Index(CreateIndex())
- .Create(ct =>
- ct.Id(auditLog.Id)
- .Document(auditLog)));
+ //var response = await client.IndexAsync(
+ // auditLog,
+ // (x) => x.Index(CreateIndex())
+ // .Id(auditLog.Id),
+ // cancellationToken);
- return response.Items?.FirstOrDefault()?.Id;
- }
+ // 使用 Bulk 命令传输可能存在参数庞大的日志结构
+ var response = await client.BulkAsync(
+ dsl => dsl.Index(CreateIndex())
+ .Create(ct =>
+ ct.Id(auditLog.Id)
+ .Document(auditLog)));
- protected virtual List, QueryContainer>> BuildQueryDescriptor(
- DateTime? startTime = null,
- DateTime? endTime = null,
- string httpMethod = null,
- string url = null,
- Guid? userId = null,
- string userName = null,
- string applicationName = null,
- string correlationId = null,
- string clientId = null,
- string clientIpAddress = null,
- int? maxExecutionDuration = null,
- int? minExecutionDuration = null,
- bool? hasException = null,
- HttpStatusCode? httpStatusCode = null)
- {
- var querys = new List, QueryContainer>>();
+ return response.Items?.FirstOrDefault()?.Id;
+ }
- if (startTime.HasValue)
- {
- querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(AuditLog.ExecutionTime))).GreaterThanOrEquals(_clock.Normalize(startTime.Value))));
- }
- if (endTime.HasValue)
- {
- querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(AuditLog.ExecutionTime))).LessThanOrEquals(_clock.Normalize(endTime.Value))));
- }
- if (!httpMethod.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.HttpMethod))).Value(httpMethod)));
- }
- if (!url.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Wildcard((q) => q.Field(GetField(nameof(AuditLog.Url))).Value($"*{url}*")));
- }
- if (userId.HasValue)
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.UserId))).Value(userId)));
- }
- if (!userName.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.UserName))).Value(userName)));
- }
- if (!applicationName.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.ApplicationName))).Value(applicationName)));
- }
- if (!correlationId.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.CorrelationId))).Value(correlationId)));
- }
- if (!clientId.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.ClientId))).Value(clientId)));
- }
- if (!clientIpAddress.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.ClientIpAddress))).Value(clientIpAddress)));
- }
- if (maxExecutionDuration.HasValue)
- {
- querys.Add((log) => log.Range((q) => q.Field(GetField(nameof(AuditLog.ExecutionDuration))).LessThanOrEquals(maxExecutionDuration)));
- }
- if (minExecutionDuration.HasValue)
- {
- querys.Add((log) => log.Range((q) => q.Field(GetField(nameof(AuditLog.ExecutionDuration))).GreaterThanOrEquals(minExecutionDuration)));
- }
+ protected virtual List, QueryContainer>> BuildQueryDescriptor(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string httpMethod = null,
+ string url = null,
+ Guid? userId = null,
+ string userName = null,
+ string applicationName = null,
+ string correlationId = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ int? maxExecutionDuration = null,
+ int? minExecutionDuration = null,
+ bool? hasException = null,
+ HttpStatusCode? httpStatusCode = null)
+ {
+ var querys = new List, QueryContainer>>();
+
+ if (startTime.HasValue)
+ {
+ querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(AuditLog.ExecutionTime))).GreaterThanOrEquals(_clock.Normalize(startTime.Value))));
+ }
+ if (endTime.HasValue)
+ {
+ querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(AuditLog.ExecutionTime))).LessThanOrEquals(_clock.Normalize(endTime.Value))));
+ }
+ if (!httpMethod.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.HttpMethod))).Value(httpMethod)));
+ }
+ if (!url.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Wildcard((q) => q.Field(GetField(nameof(AuditLog.Url))).Value($"*{url}*")));
+ }
+ if (userId.HasValue)
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.UserId))).Value(userId)));
+ }
+ if (!userName.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.UserName))).Value(userName)));
+ }
+ if (!applicationName.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.ApplicationName))).Value(applicationName)));
+ }
+ if (!correlationId.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.CorrelationId))).Value(correlationId)));
+ }
+ if (!clientId.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.ClientId))).Value(clientId)));
+ }
+ if (!clientIpAddress.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.ClientIpAddress))).Value(clientIpAddress)));
+ }
+ if (maxExecutionDuration.HasValue)
+ {
+ querys.Add((log) => log.Range((q) => q.Field(GetField(nameof(AuditLog.ExecutionDuration))).LessThanOrEquals(maxExecutionDuration)));
+ }
+ if (minExecutionDuration.HasValue)
+ {
+ querys.Add((log) => log.Range((q) => q.Field(GetField(nameof(AuditLog.ExecutionDuration))).GreaterThanOrEquals(minExecutionDuration)));
+ }
- if (hasException.HasValue)
+ if (hasException.HasValue)
+ {
+ if (hasException.Value)
{
- if (hasException.Value)
- {
- querys.Add(
- (q) => q.Bool(
- (b) => b.Must(
- (m) => m.Exists(
- (e) => e.Field((f) => f.Exceptions)))
- )
- );
- }
- else
- {
- querys.Add(
- (q) => q.Bool(
- (b) => b.MustNot(
- (mn) => mn.Exists(
- (e) => e.Field(
- (f) => f.Exceptions)))
- )
- );
- }
+ querys.Add(
+ (q) => q.Bool(
+ (b) => b.Must(
+ (m) => m.Exists(
+ (e) => e.Field((f) => f.Exceptions)))
+ )
+ );
}
-
- if (httpStatusCode.HasValue)
+ else
{
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.HttpStatusCode))).Value(httpStatusCode)));
+ querys.Add(
+ (q) => q.Bool(
+ (b) => b.MustNot(
+ (mn) => mn.Exists(
+ (e) => e.Field(
+ (f) => f.Exceptions)))
+ )
+ );
}
-
- return querys;
}
- protected virtual string CreateIndex()
+ if (httpStatusCode.HasValue)
{
- return _indexNameNormalizer.NormalizeIndex("audit-log");
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(AuditLog.HttpStatusCode))).Value(httpStatusCode)));
}
- private readonly static IDictionary _fieldMaps = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
- {
- { "Id", "Id.keyword" },
- { "ApplicationName", "ApplicationName.keyword" },
- { "UserId", "UserId.keyword" },
- { "UserName", "UserName.keyword" },
- { "TenantId", "TenantId.keyword" },
- { "TenantName", "TenantName.keyword" },
- { "ImpersonatorUserId", "ImpersonatorUserId.keyword" },
- { "ImpersonatorTenantId", "ImpersonatorTenantId.keyword" },
- { "ClientName", "ClientName.keyword" },
- { "ClientIpAddress", "ClientIpAddress.keyword" },
- { "ClientId", "ClientId.keyword" },
- { "CorrelationId", "CorrelationId.keyword" },
- { "BrowserInfo", "BrowserInfo.keyword" },
- { "HttpMethod", "HttpMethod.keyword" },
- { "Url", "Url.keyword" },
- { "ExecutionDuration", "ExecutionDuration" },
- { "ExecutionTime", "ExecutionTime" },
- { "HttpStatusCode", "HttpStatusCode" },
- };
- protected virtual string GetField(string field)
- {
- if (_fieldMaps.TryGetValue(field, out string mapField))
- {
- return _elasticsearchOptions.FieldCamelCase ? mapField.ToCamelCase() : mapField.ToPascalCase();
- }
+ return querys;
+ }
+
+ protected virtual string CreateIndex()
+ {
+ return _indexNameNormalizer.NormalizeIndex("audit-log");
+ }
- return _elasticsearchOptions.FieldCamelCase ? field.ToCamelCase() : field.ToPascalCase();
+ private readonly static IDictionary _fieldMaps = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
+ {
+ { "Id", "Id.keyword" },
+ { "ApplicationName", "ApplicationName.keyword" },
+ { "UserId", "UserId.keyword" },
+ { "UserName", "UserName.keyword" },
+ { "TenantId", "TenantId.keyword" },
+ { "TenantName", "TenantName.keyword" },
+ { "ImpersonatorUserId", "ImpersonatorUserId.keyword" },
+ { "ImpersonatorTenantId", "ImpersonatorTenantId.keyword" },
+ { "ClientName", "ClientName.keyword" },
+ { "ClientIpAddress", "ClientIpAddress.keyword" },
+ { "ClientId", "ClientId.keyword" },
+ { "CorrelationId", "CorrelationId.keyword" },
+ { "BrowserInfo", "BrowserInfo.keyword" },
+ { "HttpMethod", "HttpMethod.keyword" },
+ { "Url", "Url.keyword" },
+ { "ExecutionDuration", "ExecutionDuration" },
+ { "ExecutionTime", "ExecutionTime" },
+ { "HttpStatusCode", "HttpStatusCode" },
+ };
+ protected virtual string GetField(string field)
+ {
+ if (_fieldMaps.TryGetValue(field, out string mapField))
+ {
+ return _elasticsearchOptions.FieldCamelCase ? mapField.ToCamelCase() : mapField.ToPascalCase();
}
+
+ return _elasticsearchOptions.FieldCamelCase ? field.ToCamelCase() : field.ToPascalCase();
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs
index a6cc31c3d..d2df7b93f 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs
@@ -13,260 +13,259 @@
using Volo.Abp.SecurityLog;
using Volo.Abp.Timing;
-namespace LINGYUN.Abp.AuditLogging.Elasticsearch
+namespace LINGYUN.Abp.AuditLogging.Elasticsearch;
+
+[Dependency(ReplaceServices = true)]
+public class ElasticsearchSecurityLogManager : ISecurityLogManager, ITransientDependency
{
- [Dependency(ReplaceServices = true)]
- public class ElasticsearchSecurityLogManager : ISecurityLogManager, ITransientDependency
+ private readonly AbpSecurityLogOptions _securityLogOptions;
+ private readonly AbpElasticsearchOptions _elasticsearchOptions;
+ private readonly IIndexNameNormalizer _indexNameNormalizer;
+ private readonly IGuidGenerator _guidGenerator;
+ private readonly IElasticsearchClientFactory _clientFactory;
+ private readonly IClock _clock;
+
+ public ILogger Logger { protected get; set; }
+
+ public ElasticsearchSecurityLogManager(
+ IClock clock,
+ IGuidGenerator guidGenerator,
+ IIndexNameNormalizer indexNameNormalizer,
+ IOptions securityLogOptions,
+ IOptions elasticsearchOptions,
+ IElasticsearchClientFactory clientFactory)
{
- private readonly AbpSecurityLogOptions _securityLogOptions;
- private readonly AbpElasticsearchOptions _elasticsearchOptions;
- private readonly IIndexNameNormalizer _indexNameNormalizer;
- private readonly IGuidGenerator _guidGenerator;
- private readonly IElasticsearchClientFactory _clientFactory;
- private readonly IClock _clock;
+ _clock = clock;
+ _guidGenerator = guidGenerator;
+ _clientFactory = clientFactory;
+ _indexNameNormalizer = indexNameNormalizer;
+ _securityLogOptions = securityLogOptions.Value;
+ _elasticsearchOptions = elasticsearchOptions.Value;
- public ILogger Logger { protected get; set; }
+ Logger = NullLogger.Instance;
+ }
- public ElasticsearchSecurityLogManager(
- IClock clock,
- IGuidGenerator guidGenerator,
- IIndexNameNormalizer indexNameNormalizer,
- IOptions securityLogOptions,
- IOptions elasticsearchOptions,
- IElasticsearchClientFactory clientFactory)
+ public async virtual Task SaveAsync(
+ SecurityLogInfo securityLogInfo,
+ CancellationToken cancellationToken = default)
+ {
+ // TODO: 框架不把这玩意儿放在 ISecurityLogManager?
+ if (!_securityLogOptions.IsEnabled)
{
- _clock = clock;
- _guidGenerator = guidGenerator;
- _clientFactory = clientFactory;
- _indexNameNormalizer = indexNameNormalizer;
- _securityLogOptions = securityLogOptions.Value;
- _elasticsearchOptions = elasticsearchOptions.Value;
-
- Logger = NullLogger.Instance;
+ return;
}
- public async virtual Task SaveAsync(
- SecurityLogInfo securityLogInfo,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- // TODO: 框架不把这玩意儿放在 ISecurityLogManager?
- if (!_securityLogOptions.IsEnabled)
- {
- return;
- }
+ var client = _clientFactory.Create();
- var client = _clientFactory.Create();
+ var securityLog = new SecurityLog(
+ _guidGenerator.Create(),
+ securityLogInfo);
- var securityLog = new SecurityLog(
- _guidGenerator.Create(),
- securityLogInfo);
+ await client.IndexAsync(
+ securityLog,
+ (x) => x.Index(CreateIndex())
+ .Id(securityLog.Id),
+ cancellationToken);
+ }
- await client.IndexAsync(
- securityLog,
- (x) => x.Index(CreateIndex())
- .Id(securityLog.Id),
- cancellationToken);
- }
+ public async virtual Task GetAsync(
+ Guid id,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ var client = _clientFactory.Create();
- public async virtual Task GetAsync(
- Guid id,
- bool includeDetails = false,
- CancellationToken cancellationToken = default)
- {
- var client = _clientFactory.Create();
+ var response = await client.GetAsync(
+ id,
+ dsl =>
+ dsl.Index(CreateIndex()),
+ cancellationToken);
- var response = await client.GetAsync(
- id,
- dsl =>
- dsl.Index(CreateIndex()),
- cancellationToken);
+ return response.Source;
+ }
- return response.Source;
- }
+ public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
+ {
+ var client = _clientFactory.Create();
- public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
- {
- var client = _clientFactory.Create();
+ await client.DeleteAsync(
+ id,
+ dsl =>
+ dsl.Index(CreateIndex()),
+ cancellationToken);
+ }
- await client.DeleteAsync(
- id,
- dsl =>
- dsl.Index(CreateIndex()),
- cancellationToken);
- }
+ public async virtual Task> GetListAsync(
+ string sorting = null,
+ int maxResultCount = 50,
+ int skipCount = 0,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string applicationName = null,
+ string identity = null,
+ string action = null,
+ Guid? userId = null,
+ string userName = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ string correlationId = null,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ var client = _clientFactory.Create();
- public async virtual Task> GetListAsync(
- string sorting = null,
- int maxResultCount = 50,
- int skipCount = 0,
- DateTime? startTime = null,
- DateTime? endTime = null,
- string applicationName = null,
- string identity = null,
- string action = null,
- Guid? userId = null,
- string userName = null,
- string clientId = null,
- string clientIpAddress = null,
- string correlationId = null,
- bool includeDetails = false,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- var client = _clientFactory.Create();
+ var sortOrder = !sorting.IsNullOrWhiteSpace() && sorting.EndsWith("asc", StringComparison.InvariantCultureIgnoreCase)
+ ? SortOrder.Ascending : SortOrder.Descending;
+ sorting = !sorting.IsNullOrWhiteSpace()
+ ? sorting.Split()[0]
+ : nameof(SecurityLog.CreationTime);
- var sortOrder = !sorting.IsNullOrWhiteSpace() && sorting.EndsWith("asc", StringComparison.InvariantCultureIgnoreCase)
- ? SortOrder.Ascending : SortOrder.Descending;
- sorting = !sorting.IsNullOrWhiteSpace()
- ? sorting.Split()[0]
- : nameof(SecurityLog.CreationTime);
+ var querys = BuildQueryDescriptor(
+ startTime,
+ endTime,
+ applicationName,
+ identity,
+ action,
+ userId,
+ userName,
+ clientId,
+ clientIpAddress,
+ correlationId);
- var querys = BuildQueryDescriptor(
- startTime,
- endTime,
- applicationName,
- identity,
- action,
- userId,
- userName,
- clientId,
- clientIpAddress,
- correlationId);
+ var response = await client.SearchAsync(dsl =>
+ dsl.Index(CreateIndex())
+ .Query(log => log.Bool(b => b.Must(querys.ToArray())))
+ .Source(log => log.IncludeAll())
+ .Sort(log => log.Field(GetField(sorting), sortOrder))
+ .From(skipCount)
+ .Size(maxResultCount),
+ cancellationToken);
- var response = await client.SearchAsync(dsl =>
- dsl.Index(CreateIndex())
- .Query(log => log.Bool(b => b.Must(querys.ToArray())))
- .Source(log => log.IncludeAll())
- .Sort(log => log.Field(GetField(sorting), sortOrder))
- .From(skipCount)
- .Size(maxResultCount),
- cancellationToken);
+ return response.Documents.ToList();
+ }
- return response.Documents.ToList();
- }
+ public async virtual Task GetCountAsync(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string applicationName = null,
+ string identity = null,
+ string action = null,
+ Guid? userId = null,
+ string userName = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ string correlationId = null,
+ CancellationToken cancellationToken = default)
+ {
+ var client = _clientFactory.Create();
- public async virtual Task GetCountAsync(
- DateTime? startTime = null,
- DateTime? endTime = null,
- string applicationName = null,
- string identity = null,
- string action = null,
- Guid? userId = null,
- string userName = null,
- string clientId = null,
- string clientIpAddress = null,
- string correlationId = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- var client = _clientFactory.Create();
+ var querys = BuildQueryDescriptor(
+ startTime,
+ endTime,
+ applicationName,
+ identity,
+ action,
+ userId,
+ userName,
+ clientId,
+ clientIpAddress,
+ correlationId);
- var querys = BuildQueryDescriptor(
- startTime,
- endTime,
- applicationName,
- identity,
- action,
- userId,
- userName,
- clientId,
- clientIpAddress,
- correlationId);
+ var response = await client.CountAsync(dsl =>
+ dsl.Index(CreateIndex())
+ .Query(log => log.Bool(b => b.Must(querys.ToArray()))),
+ cancellationToken);
- var response = await client.CountAsync(dsl =>
- dsl.Index(CreateIndex())
- .Query(log => log.Bool(b => b.Must(querys.ToArray()))),
- cancellationToken);
+ return response.Count;
+ }
- return response.Count;
- }
+ protected virtual List, QueryContainer>> BuildQueryDescriptor(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string applicationName = null,
+ string identity = null,
+ string action = null,
+ Guid? userId = null,
+ string userName = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ string correlationId = null)
+ {
+ var querys = new List, QueryContainer>>();
- protected virtual List, QueryContainer>> BuildQueryDescriptor(
- DateTime? startTime = null,
- DateTime? endTime = null,
- string applicationName = null,
- string identity = null,
- string action = null,
- Guid? userId = null,
- string userName = null,
- string clientId = null,
- string clientIpAddress = null,
- string correlationId = null)
+ if (startTime.HasValue)
{
- var querys = new List, QueryContainer>>();
-
- if (startTime.HasValue)
- {
- querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SecurityLog.CreationTime))).GreaterThanOrEquals(_clock.Normalize(startTime.Value))));
- }
- if (endTime.HasValue)
- {
- querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SecurityLog.CreationTime))).LessThanOrEquals(_clock.Normalize(endTime.Value))));
- }
- if (!applicationName.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.ApplicationName))).Value(applicationName)));
- }
- if (!identity.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.Identity))).Value(identity)));
- }
- if (!action.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.Action))).Value(action)));
- }
- if (userId.HasValue)
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.UserId))).Value(userId)));
- }
- if (!userName.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.UserName))).Value(userName)));
- }
- if (!clientId.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.ClientId))).Value(clientId)));
- }
- if (!clientIpAddress.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.ClientIpAddress))).Value(clientIpAddress)));
- }
- if (!correlationId.IsNullOrWhiteSpace())
- {
- querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.CorrelationId))).Value(correlationId)));
- }
-
- return querys;
+ querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SecurityLog.CreationTime))).GreaterThanOrEquals(_clock.Normalize(startTime.Value))));
}
-
- protected virtual string CreateIndex()
+ if (endTime.HasValue)
{
- return _indexNameNormalizer.NormalizeIndex("security-log");
+ querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SecurityLog.CreationTime))).LessThanOrEquals(_clock.Normalize(endTime.Value))));
}
-
- private readonly static IDictionary _fieldMaps = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
+ if (!applicationName.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.ApplicationName))).Value(applicationName)));
+ }
+ if (!identity.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.Identity))).Value(identity)));
+ }
+ if (!action.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.Action))).Value(action)));
+ }
+ if (userId.HasValue)
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.UserId))).Value(userId)));
+ }
+ if (!userName.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.UserName))).Value(userName)));
+ }
+ if (!clientId.IsNullOrWhiteSpace())
{
- { "Id", "Id.keyword" },
- { "ApplicationName", "ApplicationName.keyword" },
- { "UserId", "UserId.keyword" },
- { "UserName", "UserName.keyword" },
- { "TenantId", "TenantId.keyword" },
- { "TenantName", "TenantName.keyword" },
- { "Identity", "Identity.keyword" },
- { "Action", "Action.keyword" },
- { "BrowserInfo", "BrowserInfo.keyword" },
- { "ClientIpAddress", "ClientIpAddress.keyword" },
- { "ClientId", "ClientId.keyword" },
- { "CorrelationId", "CorrelationId.keyword" },
- { "CreationTime", "CreationTime" },
- };
- protected virtual string GetField(string field)
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.ClientId))).Value(clientId)));
+ }
+ if (!clientIpAddress.IsNullOrWhiteSpace())
+ {
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.ClientIpAddress))).Value(clientIpAddress)));
+ }
+ if (!correlationId.IsNullOrWhiteSpace())
{
- if (_fieldMaps.TryGetValue(field, out string mapField))
- {
- return _elasticsearchOptions.FieldCamelCase ? mapField.ToCamelCase() : mapField.ToPascalCase();
- }
+ querys.Add((log) => log.Term((q) => q.Field(GetField(nameof(SecurityLog.CorrelationId))).Value(correlationId)));
+ }
- return _elasticsearchOptions.FieldCamelCase ? field.ToCamelCase() : field.ToPascalCase();
+ return querys;
+ }
+
+ protected virtual string CreateIndex()
+ {
+ return _indexNameNormalizer.NormalizeIndex("security-log");
+ }
+
+ private readonly static IDictionary _fieldMaps = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
+ {
+ { "Id", "Id.keyword" },
+ { "ApplicationName", "ApplicationName.keyword" },
+ { "UserId", "UserId.keyword" },
+ { "UserName", "UserName.keyword" },
+ { "TenantId", "TenantId.keyword" },
+ { "TenantName", "TenantName.keyword" },
+ { "Identity", "Identity.keyword" },
+ { "Action", "Action.keyword" },
+ { "BrowserInfo", "BrowserInfo.keyword" },
+ { "ClientIpAddress", "ClientIpAddress.keyword" },
+ { "ClientId", "ClientId.keyword" },
+ { "CorrelationId", "CorrelationId.keyword" },
+ { "CreationTime", "CreationTime" },
+ };
+ protected virtual string GetField(string field)
+ {
+ if (_fieldMaps.TryGetValue(field, out string mapField))
+ {
+ return _elasticsearchOptions.FieldCamelCase ? mapField.ToCamelCase() : mapField.ToPascalCase();
}
+
+ return _elasticsearchOptions.FieldCamelCase ? field.ToCamelCase() : field.ToPascalCase();
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IAuditLogInfoToAuditLogConverter.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IAuditLogInfoToAuditLogConverter.cs
index ed9b120e3..2bb652a6b 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IAuditLogInfoToAuditLogConverter.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IAuditLogInfoToAuditLogConverter.cs
@@ -1,10 +1,9 @@
using System.Threading.Tasks;
using Volo.Abp.Auditing;
-namespace LINGYUN.Abp.AuditLogging
+namespace LINGYUN.Abp.AuditLogging;
+
+public interface IAuditLogInfoToAuditLogConverter
{
- public interface IAuditLogInfoToAuditLogConverter
- {
- Task ConvertAsync(AuditLogInfo auditLogInfo);
- }
+ Task ConvertAsync(AuditLogInfo auditLogInfo);
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IIndexInitializer.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IIndexInitializer.cs
index d6eb705e5..9b364543d 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IIndexInitializer.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IIndexInitializer.cs
@@ -1,9 +1,8 @@
using System.Threading.Tasks;
-namespace LINGYUN.Abp.AuditLogging.Elasticsearch
+namespace LINGYUN.Abp.AuditLogging.Elasticsearch;
+
+public interface IIndexInitializer
{
- public interface IIndexInitializer
- {
- Task InitializeAsync();
- }
+ Task InitializeAsync();
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IIndexNameNormalizer.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IIndexNameNormalizer.cs
index e48276cd2..3ae752b63 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IIndexNameNormalizer.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IIndexNameNormalizer.cs
@@ -1,7 +1,6 @@
-namespace LINGYUN.Abp.AuditLogging.Elasticsearch
+namespace LINGYUN.Abp.AuditLogging.Elasticsearch;
+
+public interface IIndexNameNormalizer
{
- public interface IIndexNameNormalizer
- {
- string NormalizeIndex(string index);
- }
+ string NormalizeIndex(string index);
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializer.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializer.cs
index 86a677d20..d394c08fd 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializer.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializer.cs
@@ -9,98 +9,97 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Json;
-namespace LINGYUN.Abp.AuditLogging.Elasticsearch
+namespace LINGYUN.Abp.AuditLogging.Elasticsearch;
+
+public class IndexInitializer : IIndexInitializer, ISingletonDependency
{
- public class IndexInitializer : IIndexInitializer, ISingletonDependency
- {
- private readonly AbpJsonOptions _jsonOptions;
- private readonly AbpAuditLoggingElasticsearchOptions _elasticsearchOptions;
- private readonly IIndexNameNormalizer _nameNormalizer;
- private readonly IElasticsearchClientFactory _clientFactory;
+ private readonly AbpJsonOptions _jsonOptions;
+ private readonly AbpAuditLoggingElasticsearchOptions _elasticsearchOptions;
+ private readonly IIndexNameNormalizer _nameNormalizer;
+ private readonly IElasticsearchClientFactory _clientFactory;
- public ILogger Logger { protected get; set; }
+ public ILogger Logger { protected get; set; }
- public IndexInitializer(
- IOptions jsonOptions,
- IOptions elasticsearchOptions,
- IIndexNameNormalizer nameNormalizer,
- IElasticsearchClientFactory clientFactory)
- {
- _jsonOptions = jsonOptions.Value;
- _elasticsearchOptions = elasticsearchOptions.Value;
- _nameNormalizer = nameNormalizer;
- _clientFactory = clientFactory;
+ public IndexInitializer(
+ IOptions jsonOptions,
+ IOptions elasticsearchOptions,
+ IIndexNameNormalizer nameNormalizer,
+ IElasticsearchClientFactory clientFactory)
+ {
+ _jsonOptions = jsonOptions.Value;
+ _elasticsearchOptions = elasticsearchOptions.Value;
+ _nameNormalizer = nameNormalizer;
+ _clientFactory = clientFactory;
- Logger = NullLogger.Instance;
- }
+ Logger = NullLogger.Instance;
+ }
- public async virtual Task InitializeAsync()
+ public async virtual Task InitializeAsync()
+ {
+ var client = _clientFactory.Create();
+ var dateTimeFormat = !_jsonOptions.OutputDateTimeFormat.IsNullOrWhiteSpace()
+ ? $"{_jsonOptions.OutputDateTimeFormat}||strict_date_optional_time||epoch_millis"
+ : "strict_date_optional_time||epoch_millis";
+ var indexState = new IndexState
{
- var client = _clientFactory.Create();
- var dateTimeFormat = !_jsonOptions.OutputDateTimeFormat.IsNullOrWhiteSpace()
- ? $"{_jsonOptions.OutputDateTimeFormat}||strict_date_optional_time||epoch_millis"
- : "strict_date_optional_time||epoch_millis";
- var indexState = new IndexState
- {
- Settings = _elasticsearchOptions.IndexSettings,
- };
- await InitlizeAuditLogIndex(client, indexState, dateTimeFormat);
- await InitlizeSecurityLogIndex(client, indexState, dateTimeFormat);
- }
+ Settings = _elasticsearchOptions.IndexSettings,
+ };
+ await InitlizeAuditLogIndex(client, indexState, dateTimeFormat);
+ await InitlizeSecurityLogIndex(client, indexState, dateTimeFormat);
+ }
- protected async virtual Task InitlizeAuditLogIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat)
+ protected async virtual Task InitlizeAuditLogIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat)
+ {
+ var indexName = _nameNormalizer.NormalizeIndex("audit-log");
+ var indexExists = await client.Indices.ExistsAsync(indexName);
+ if (!indexExists.Exists)
{
- var indexName = _nameNormalizer.NormalizeIndex("audit-log");
- var indexExists = await client.Indices.ExistsAsync(indexName);
- if (!indexExists.Exists)
+ var indexCreateResponse = await client.Indices.CreateAsync(
+ indexName,
+ dsl => dsl.InitializeUsing(indexState)
+ .Map(map =>
+ map.AutoMap()
+ .Properties(mp =>
+ mp.Date(p => p.Name(n => n.ExecutionTime).Format(dateTimeFormat))
+ .Object(p => p.Name(n => n.ExtraProperties))
+ .Nested(n =>
+ n.AutoMap()
+ .Name(nameof(AuditLog.EntityChanges))
+ .Properties(np =>
+ np.Object(p => p.Name(n => n.ExtraProperties))
+ .Date(p => p.Name(n => n.ChangeTime).Format(dateTimeFormat))
+ .Nested(npn => npn.Name(nameof(EntityChange.PropertyChanges)))))
+ .Nested(n => n.Name(nameof(AuditLog.Actions))
+ .AutoMap()
+ .Properties((np =>
+ np.Object(p => p.Name(n => n.ExtraProperties))
+ .Date(p => p.Name(n => n.ExecutionTime).Format(dateTimeFormat))))))));
+ if (!indexCreateResponse.IsValid)
{
- var indexCreateResponse = await client.Indices.CreateAsync(
- indexName,
- dsl => dsl.InitializeUsing(indexState)
- .Map(map =>
- map.AutoMap()
- .Properties(mp =>
- mp.Date(p => p.Name(n => n.ExecutionTime).Format(dateTimeFormat))
- .Object(p => p.Name(n => n.ExtraProperties))
- .Nested(n =>
- n.AutoMap()
- .Name(nameof(AuditLog.EntityChanges))
- .Properties(np =>
- np.Object(p => p.Name(n => n.ExtraProperties))
- .Date(p => p.Name(n => n.ChangeTime).Format(dateTimeFormat))
- .Nested(npn => npn.Name(nameof(EntityChange.PropertyChanges)))))
- .Nested(n => n.Name(nameof(AuditLog.Actions))
- .AutoMap()
- .Properties((np =>
- np.Object(p => p.Name(n => n.ExtraProperties))
- .Date(p => p.Name(n => n.ExecutionTime).Format(dateTimeFormat))))))));
- if (!indexCreateResponse.IsValid)
- {
- Logger.LogWarning("Failed to initialize index and audit log may not be retrieved.");
- Logger.LogWarning(indexCreateResponse.OriginalException.ToString());
- }
+ Logger.LogWarning("Failed to initialize index and audit log may not be retrieved.");
+ Logger.LogWarning(indexCreateResponse.OriginalException.ToString());
}
}
+ }
- protected async virtual Task InitlizeSecurityLogIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat)
+ protected async virtual Task InitlizeSecurityLogIndex(IElasticClient client, IIndexState indexState, string dateTimeFormat)
+ {
+ var indexName = _nameNormalizer.NormalizeIndex("security-log");
+ var indexExists = await client.Indices.ExistsAsync(indexName);
+ if (!indexExists.Exists)
{
- var indexName = _nameNormalizer.NormalizeIndex("security-log");
- var indexExists = await client.Indices.ExistsAsync(indexName);
- if (!indexExists.Exists)
+ var indexCreateResponse = await client.Indices.CreateAsync(
+ indexName,
+ dsl => dsl.InitializeUsing(indexState)
+ .Map(map =>
+ map.AutoMap()
+ .Properties(mp =>
+ mp.Object(p => p.Name(n => n.ExtraProperties))
+ .Date(p => p.Name(n => n.CreationTime).Format(dateTimeFormat)))));
+ if (!indexCreateResponse.IsValid)
{
- var indexCreateResponse = await client.Indices.CreateAsync(
- indexName,
- dsl => dsl.InitializeUsing(indexState)
- .Map(map =>
- map.AutoMap()
- .Properties(mp =>
- mp.Object(p => p.Name(n => n.ExtraProperties))
- .Date(p => p.Name(n => n.CreationTime).Format(dateTimeFormat)))));
- if (!indexCreateResponse.IsValid)
- {
- Logger.LogWarning("Failed to initialize index and security log may not be retrieved.");
- Logger.LogWarning(indexCreateResponse.OriginalException.ToString());
- }
+ Logger.LogWarning("Failed to initialize index and security log may not be retrieved.");
+ Logger.LogWarning(indexCreateResponse.OriginalException.ToString());
}
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializerService.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializerService.cs
index 75ba37210..e75d762c2 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializerService.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexInitializerService.cs
@@ -2,20 +2,19 @@
using System.Threading;
using System.Threading.Tasks;
-namespace LINGYUN.Abp.AuditLogging.Elasticsearch
+namespace LINGYUN.Abp.AuditLogging.Elasticsearch;
+
+public class IndexInitializerService : BackgroundService
{
- public class IndexInitializerService : BackgroundService
- {
- private readonly IIndexInitializer _indexInitializer;
+ private readonly IIndexInitializer _indexInitializer;
- public IndexInitializerService(IIndexInitializer indexInitializer)
- {
- _indexInitializer = indexInitializer;
- }
+ public IndexInitializerService(IIndexInitializer indexInitializer)
+ {
+ _indexInitializer = indexInitializer;
+ }
- protected override async Task ExecuteAsync(CancellationToken stoppingToken)
- {
- await _indexInitializer.InitializeAsync();
- }
+ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
+ {
+ await _indexInitializer.InitializeAsync();
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexNameNormalizer.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexNameNormalizer.cs
index e4d143d0c..4245a50bb 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexNameNormalizer.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/IndexNameNormalizer.cs
@@ -3,30 +3,29 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
-namespace LINGYUN.Abp.AuditLogging.Elasticsearch
+namespace LINGYUN.Abp.AuditLogging.Elasticsearch;
+
+public class IndexNameNormalizer : IIndexNameNormalizer, ISingletonDependency
{
- public class IndexNameNormalizer : IIndexNameNormalizer, ISingletonDependency
- {
- private readonly ICurrentTenant _currentTenant;
- private readonly AbpAuditLoggingElasticsearchOptions _options;
+ private readonly ICurrentTenant _currentTenant;
+ private readonly AbpAuditLoggingElasticsearchOptions _options;
- public IndexNameNormalizer(
- ICurrentTenant currentTenant,
- IOptions options)
- {
- _currentTenant = currentTenant;
- _options = options.Value;
- }
+ public IndexNameNormalizer(
+ ICurrentTenant currentTenant,
+ IOptions options)
+ {
+ _currentTenant = currentTenant;
+ _options = options.Value;
+ }
- public string NormalizeIndex(string index)
+ public string NormalizeIndex(string index)
+ {
+ if (_currentTenant.IsAvailable)
{
- if (_currentTenant.IsAvailable)
- {
- return $"{_options.IndexPrefix}-{index}-{_currentTenant.Id:N}";
- }
- return _options.IndexPrefix.IsNullOrWhiteSpace()
- ? index
- : $"{_options.IndexPrefix}-{index}";
+ return $"{_options.IndexPrefix}-{index}-{_currentTenant.Id:N}";
}
+ return _options.IndexPrefix.IsNullOrWhiteSpace()
+ ? index
+ : $"{_options.IndexPrefix}-{index}";
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj
index 5fb21ab37..08a753b27 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj
@@ -5,6 +5,11 @@
net8.0
+ LINGYUN.Abp.AuditLogging.EntityFrameworkCore
+ LINGYUN.Abp.AuditLogging.EntityFrameworkCore
+ false
+ false
+ false
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreModule.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreModule.cs
index 57f4c4826..2ca98c940 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreModule.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreModule.cs
@@ -2,24 +2,23 @@
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
-namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore
+namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
+
+[DependsOn(
+ typeof(Volo.Abp.Identity.EntityFrameworkCore.AbpIdentityEntityFrameworkCoreModule),
+ typeof(Volo.Abp.AuditLogging.EntityFrameworkCore.AbpAuditLoggingEntityFrameworkCoreModule))]
+[DependsOn(
+ typeof(AbpAuditLoggingModule),
+ typeof(AbpAutoMapperModule))]
+public class AbpAuditLoggingEntityFrameworkCoreModule : AbpModule
{
- [DependsOn(
- typeof(Volo.Abp.Identity.EntityFrameworkCore.AbpIdentityEntityFrameworkCoreModule),
- typeof(Volo.Abp.AuditLogging.EntityFrameworkCore.AbpAuditLoggingEntityFrameworkCoreModule))]
- [DependsOn(
- typeof(AbpAuditLoggingModule),
- typeof(AbpAutoMapperModule))]
- public class AbpAuditLoggingEntityFrameworkCoreModule : AbpModule
+ public override void ConfigureServices(ServiceConfigurationContext context)
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- context.Services.AddAutoMapperObjectMapper();
+ context.Services.AddAutoMapperObjectMapper();
- Configure(options =>
- {
- options.AddProfile(validate: true);
- });
- }
+ Configure(options =>
+ {
+ options.AddProfile(validate: true);
+ });
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditingMapperProfile.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditingMapperProfile.cs
index 73609aa23..14ac2d52b 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditingMapperProfile.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditingMapperProfile.cs
@@ -1,21 +1,20 @@
using AutoMapper;
-namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore
+namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
+
+public class AbpAuditingMapperProfile : Profile
{
- public class AbpAuditingMapperProfile : Profile
+ public AbpAuditingMapperProfile()
{
- public AbpAuditingMapperProfile()
- {
- CreateMap()
- .MapExtraProperties();
- CreateMap();
- CreateMap()
- .MapExtraProperties();
- CreateMap()
- .MapExtraProperties();
+ CreateMap()
+ .MapExtraProperties();
+ CreateMap();
+ CreateMap()
+ .MapExtraProperties();
+ CreateMap()
+ .MapExtraProperties();
- CreateMap()
- .MapExtraProperties();
- }
+ CreateMap()
+ .MapExtraProperties();
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs
index 1e577c879..2d862c69d 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs
@@ -12,168 +12,169 @@
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
-namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore
+namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
+
+[Dependency(ReplaceServices = true)]
+public class AuditLogManager : IAuditLogManager, ITransientDependency
{
- [Dependency(ReplaceServices = true)]
- public class AuditLogManager : IAuditLogManager, ITransientDependency
+ protected IObjectMapper ObjectMapper { get; }
+ protected IAuditLogRepository AuditLogRepository { get; }
+ protected IUnitOfWorkManager UnitOfWorkManager { get; }
+ protected AbpAuditingOptions Options { get; }
+ protected IAuditLogInfoToAuditLogConverter Converter { get; }
+
+ public ILogger Logger { protected get; set; }
+
+ public AuditLogManager(
+ IObjectMapper objectMapper,
+ IAuditLogRepository auditLogRepository,
+ IUnitOfWorkManager unitOfWorkManager,
+ IOptions options,
+ IAuditLogInfoToAuditLogConverter converter)
{
- protected IObjectMapper ObjectMapper { get; }
- protected IAuditLogRepository AuditLogRepository { get; }
- protected IUnitOfWorkManager UnitOfWorkManager { get; }
- protected AbpAuditingOptions Options { get; }
- protected IAuditLogInfoToAuditLogConverter Converter { get; }
-
- public ILogger Logger { protected get; set; }
-
- public AuditLogManager(
- IObjectMapper objectMapper,
- IAuditLogRepository auditLogRepository,
- IUnitOfWorkManager unitOfWorkManager,
- IOptions options,
- IAuditLogInfoToAuditLogConverter converter)
- {
- ObjectMapper = objectMapper;
- AuditLogRepository = auditLogRepository;
- UnitOfWorkManager = unitOfWorkManager;
- Converter = converter;
- Options = options.Value;
+ ObjectMapper = objectMapper;
+ AuditLogRepository = auditLogRepository;
+ UnitOfWorkManager = unitOfWorkManager;
+ Converter = converter;
+ Options = options.Value;
- Logger = NullLogger.Instance;
- }
+ Logger = NullLogger.Instance;
+ }
- public async virtual Task GetCountAsync(
- DateTime? startTime = null,
- DateTime? endTime = null,
- string httpMethod = null,
- string url = null,
- Guid? userId = null,
- string userName = null,
- string applicationName = null,
- string correlationId = null,
- string clientId = null,
- string clientIpAddress = null,
- int? maxExecutionDuration = null,
- int? minExecutionDuration = null,
- bool? hasException = null,
- HttpStatusCode? httpStatusCode = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- return await AuditLogRepository.GetCountAsync(
- startTime,
- endTime,
- httpMethod,
- url,
- userId,
- userName,
- applicationName,
- clientIpAddress,
- correlationId,
- maxExecutionDuration,
- minExecutionDuration,
- hasException,
- httpStatusCode,
- cancellationToken);
- }
+ public async virtual Task GetCountAsync(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string httpMethod = null,
+ string url = null,
+ Guid? userId = null,
+ string userName = null,
+ string applicationName = null,
+ string correlationId = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ int? maxExecutionDuration = null,
+ int? minExecutionDuration = null,
+ bool? hasException = null,
+ HttpStatusCode? httpStatusCode = null,
+ CancellationToken cancellationToken = default)
+ {
+ return await AuditLogRepository.GetCountAsync(
+ startTime,
+ endTime,
+ httpMethod,
+ url,
+ clientId,
+ userId,
+ userName,
+ applicationName,
+ clientIpAddress,
+ correlationId,
+ maxExecutionDuration,
+ minExecutionDuration,
+ hasException,
+ httpStatusCode,
+ cancellationToken);
+ }
- public async virtual Task> GetListAsync(
- string sorting = null,
- int maxResultCount = 50,
- int skipCount = 0,
- DateTime? startTime = null,
- DateTime? endTime = null,
- string httpMethod = null,
- string url = null,
- Guid? userId = null,
- string userName = null,
- string applicationName = null,
- string correlationId = null,
- string clientId = null,
- string clientIpAddress = null,
- int? maxExecutionDuration = null,
- int? minExecutionDuration = null,
- bool? hasException = null,
- HttpStatusCode? httpStatusCode = null,
- bool includeDetails = false,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- var auditLogs = await AuditLogRepository.GetListAsync(
- sorting,
- maxResultCount,
- skipCount,
- startTime,
- endTime,
- httpMethod,
- url,
- userId,
- userName,
- applicationName,
- clientIpAddress,
- correlationId,
- maxExecutionDuration,
- minExecutionDuration,
- hasException,
- httpStatusCode,
- includeDetails,
- cancellationToken);
+ public async virtual Task> GetListAsync(
+ string sorting = null,
+ int maxResultCount = 50,
+ int skipCount = 0,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string httpMethod = null,
+ string url = null,
+ Guid? userId = null,
+ string userName = null,
+ string applicationName = null,
+ string correlationId = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ int? maxExecutionDuration = null,
+ int? minExecutionDuration = null,
+ bool? hasException = null,
+ HttpStatusCode? httpStatusCode = null,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ var auditLogs = await AuditLogRepository.GetListAsync(
+ sorting,
+ maxResultCount,
+ skipCount,
+ startTime,
+ endTime,
+ httpMethod,
+ url,
+ clientId,
+ userId,
+ userName,
+ applicationName,
+ clientIpAddress,
+ correlationId,
+ maxExecutionDuration,
+ minExecutionDuration,
+ hasException,
+ httpStatusCode,
+ includeDetails,
+ cancellationToken);
- return ObjectMapper.Map, List>(auditLogs);
- }
+ return ObjectMapper.Map, List>(auditLogs);
+ }
- public async virtual Task GetAsync(
- Guid id,
- bool includeDetails = false,
- CancellationToken cancellationToken = default)
- {
- var auditLog = await AuditLogRepository.GetAsync(id, includeDetails, cancellationToken);
+ public async virtual Task GetAsync(
+ Guid id,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ var auditLog = await AuditLogRepository.GetAsync(id, includeDetails, cancellationToken);
+
+ return ObjectMapper.Map(auditLog);
+ }
- return ObjectMapper.Map(auditLog);
+ public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
+ {
+ using (var uow = UnitOfWorkManager.Begin(true))
+ {
+ await AuditLogRepository.DeleteAsync(id);
+ await uow.CompleteAsync();
}
+ }
- public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
+ public async virtual Task SaveAsync(
+ AuditLogInfo auditInfo,
+ CancellationToken cancellationToken = default)
+ {
+ if (!Options.HideErrors)
{
- using (var uow = UnitOfWorkManager.Begin(true))
- {
- await AuditLogRepository.DeleteAsync(id);
- await uow.CompleteAsync();
- }
+ return await SaveLogAsync(auditInfo, cancellationToken);
}
- public async virtual Task SaveAsync(
- AuditLogInfo auditInfo,
- CancellationToken cancellationToken = default(CancellationToken))
+ try
+ {
+ return await SaveLogAsync(auditInfo, cancellationToken);
+ }
+ catch (Exception ex)
{
- if (!Options.HideErrors)
- {
- return await SaveLogAsync(auditInfo, cancellationToken);
- }
-
- try
- {
- return await SaveLogAsync(auditInfo, cancellationToken);
- }
- catch (Exception ex)
- {
- Logger.LogWarning("Could not save the audit log object: " + Environment.NewLine + auditInfo.ToString());
- Logger.LogException(ex, LogLevel.Error);
- }
- return "";
+ Logger.LogWarning("Could not save the audit log object: " + Environment.NewLine + auditInfo.ToString());
+ Logger.LogException(ex, LogLevel.Error);
}
+ return "";
+ }
- protected async virtual Task SaveLogAsync(
- AuditLogInfo auditInfo,
- CancellationToken cancellationToken = default(CancellationToken))
+ protected async virtual Task SaveLogAsync(
+ AuditLogInfo auditInfo,
+ CancellationToken cancellationToken = default)
+ {
+ using (var uow = UnitOfWorkManager.Begin(true))
{
- using (var uow = UnitOfWorkManager.Begin(true))
- {
- var auditLog = await AuditLogRepository.InsertAsync(
- await Converter.ConvertAsync(auditInfo),
- false,
- cancellationToken);
- await uow.CompleteAsync();
-
- return auditLog.Id.ToString();
- }
+ var auditLog = await AuditLogRepository.InsertAsync(
+ await Converter.ConvertAsync(auditInfo),
+ false,
+ cancellationToken);
+ await uow.CompleteAsync();
+
+ return auditLog.Id.ToString();
}
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs
index 7128df1d9..47e93db3e 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs
@@ -11,134 +11,133 @@
using Volo.Abp.SecurityLog;
using Volo.Abp.Uow;
-namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore
+namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
+
+[Dependency(ReplaceServices = true)]
+public class SecurityLogManager : ISecurityLogManager, ITransientDependency
{
- [Dependency(ReplaceServices = true)]
- public class SecurityLogManager : ISecurityLogManager, ITransientDependency
- {
- public ILogger Logger { get; set; }
+ public ILogger Logger { get; set; }
+
+ protected IObjectMapper ObjectMapper { get; }
+ protected AbpSecurityLogOptions SecurityLogOptions { get; }
+ protected IIdentitySecurityLogRepository IdentitySecurityLogRepository { get; }
+ protected IGuidGenerator GuidGenerator { get; }
+ protected IUnitOfWorkManager UnitOfWorkManager { get; }
- protected IObjectMapper ObjectMapper { get; }
- protected AbpSecurityLogOptions SecurityLogOptions { get; }
- protected IIdentitySecurityLogRepository IdentitySecurityLogRepository { get; }
- protected IGuidGenerator GuidGenerator { get; }
- protected IUnitOfWorkManager UnitOfWorkManager { get; }
+ public SecurityLogManager(
+ IObjectMapper objectMapper,
+ ILogger logger,
+ IOptions securityLogOptions,
+ IIdentitySecurityLogRepository identitySecurityLogRepository,
+ IGuidGenerator guidGenerator,
+ IUnitOfWorkManager unitOfWorkManager)
+ {
+ Logger = logger;
+ ObjectMapper = objectMapper;
+ SecurityLogOptions = securityLogOptions.Value;
+ IdentitySecurityLogRepository = identitySecurityLogRepository;
+ GuidGenerator = guidGenerator;
+ UnitOfWorkManager = unitOfWorkManager;
+ }
- public SecurityLogManager(
- IObjectMapper objectMapper,
- ILogger logger,
- IOptions securityLogOptions,
- IIdentitySecurityLogRepository identitySecurityLogRepository,
- IGuidGenerator guidGenerator,
- IUnitOfWorkManager unitOfWorkManager)
+ public async virtual Task SaveAsync(
+ SecurityLogInfo securityLogInfo,
+ CancellationToken cancellationToken = default)
+ {
+ if (!SecurityLogOptions.IsEnabled)
{
- Logger = logger;
- ObjectMapper = objectMapper;
- SecurityLogOptions = securityLogOptions.Value;
- IdentitySecurityLogRepository = identitySecurityLogRepository;
- GuidGenerator = guidGenerator;
- UnitOfWorkManager = unitOfWorkManager;
+ return;
}
- public async virtual Task SaveAsync(
- SecurityLogInfo securityLogInfo,
- CancellationToken cancellationToken = default(CancellationToken))
+ using (var uow = UnitOfWorkManager.Begin(requiresNew: true))
{
- if (!SecurityLogOptions.IsEnabled)
- {
- return;
- }
-
- using (var uow = UnitOfWorkManager.Begin(requiresNew: true))
- {
- await IdentitySecurityLogRepository.InsertAsync(
- new IdentitySecurityLog(GuidGenerator, securityLogInfo),
- false,
- cancellationToken);
- await uow.CompleteAsync();
- }
+ await IdentitySecurityLogRepository.InsertAsync(
+ new IdentitySecurityLog(GuidGenerator, securityLogInfo),
+ false,
+ cancellationToken);
+ await uow.CompleteAsync();
}
+ }
- public async virtual Task GetAsync(
- Guid id,
- bool includeDetails = false,
- CancellationToken cancellationToken = default)
- {
- var securityLog = await IdentitySecurityLogRepository.GetAsync(id, includeDetails, cancellationToken);
+ public async virtual Task GetAsync(
+ Guid id,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ var securityLog = await IdentitySecurityLogRepository.GetAsync(id, includeDetails, cancellationToken);
- return ObjectMapper.Map(securityLog);
- }
+ return ObjectMapper.Map(securityLog);
+ }
- public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
+ public async virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
+ {
+ using (var uow = UnitOfWorkManager.Begin(true))
{
- using (var uow = UnitOfWorkManager.Begin(true))
- {
- await IdentitySecurityLogRepository.DeleteAsync(id);
- await uow.CompleteAsync();
- }
+ await IdentitySecurityLogRepository.DeleteAsync(id);
+ await uow.CompleteAsync();
}
+ }
- public async virtual Task> GetListAsync(
- string sorting = null,
- int maxResultCount = 50,
- int skipCount = 0,
- DateTime? startTime = null,
- DateTime? endTime = null,
- string applicationName = null,
- string identity = null,
- string action = null,
- Guid? userId = null,
- string userName = null,
- string clientId = null,
- string clientIpAddress = null,
- string correlationId = null,
- bool includeDetails = false,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- var securityLogs = await IdentitySecurityLogRepository.GetListAsync(
- sorting,
- maxResultCount,
- skipCount,
- startTime,
- endTime,
- applicationName,
- identity,
- action,
- userId,
- userName,
- clientId,
- correlationId,
- includeDetails,
- cancellationToken);
+ public async virtual Task> GetListAsync(
+ string sorting = null,
+ int maxResultCount = 50,
+ int skipCount = 0,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string applicationName = null,
+ string identity = null,
+ string action = null,
+ Guid? userId = null,
+ string userName = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ string correlationId = null,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ var securityLogs = await IdentitySecurityLogRepository.GetListAsync(
+ sorting,
+ maxResultCount,
+ skipCount,
+ startTime,
+ endTime,
+ applicationName,
+ identity,
+ action,
+ userId,
+ userName,
+ clientId,
+ correlationId,
+ includeDetails,
+ cancellationToken);
- return ObjectMapper.Map, List>(securityLogs);
- }
+ return ObjectMapper.Map, List>(securityLogs);
+ }
- public async virtual Task GetCountAsync(
- DateTime? startTime = null,
- DateTime? endTime = null,
- string applicationName = null,
- string identity = null,
- string action = null,
- Guid? userId = null,
- string userName = null,
- string clientId = null,
- string clientIpAddress = null,
- string correlationId = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- return await IdentitySecurityLogRepository.GetCountAsync(
- startTime,
- endTime,
- applicationName,
- identity,
- action,
- userId,
- userName,
- clientId,
- correlationId,
- cancellationToken);
- }
+ public async virtual Task GetCountAsync(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string applicationName = null,
+ string identity = null,
+ string action = null,
+ Guid? userId = null,
+ string userName = null,
+ string clientId = null,
+ string clientIpAddress = null,
+ string correlationId = null,
+ CancellationToken cancellationToken = default)
+ {
+ return await IdentitySecurityLogRepository.GetCountAsync(
+ startTime,
+ endTime,
+ applicationName,
+ identity,
+ action,
+ userId,
+ userName,
+ clientId,
+ correlationId,
+ cancellationToken);
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN.Abp.AuditLogging.csproj b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN.Abp.AuditLogging.csproj
index e5bcce1fa..ea651f63b 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN.Abp.AuditLogging.csproj
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN.Abp.AuditLogging.csproj
@@ -4,7 +4,14 @@
- netstandard2.0
+ netstandard2.0;netstandard2.1;net8.0
+ enable
+ Nullable
+ LINGYUN.Abp.AuditLogging
+ LINGYUN.Abp.AuditLogging
+ false
+ false
+ false
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AbpAuditLoggingModule.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AbpAuditLoggingModule.cs
index 5bacc66bc..1de4e8c42 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AbpAuditLoggingModule.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AbpAuditLoggingModule.cs
@@ -5,21 +5,20 @@
using Volo.Abp.Guids;
using Volo.Abp.Modularity;
-namespace LINGYUN.Abp.AuditLogging
+namespace LINGYUN.Abp.AuditLogging;
+
+[DependsOn(
+ typeof(AbpAuditingModule),
+ typeof(AbpGuidsModule),
+ typeof(AbpExceptionHandlingModule))]
+public class AbpAuditLoggingModule : AbpModule
{
- [DependsOn(
- typeof(AbpAuditingModule),
- typeof(AbpGuidsModule),
- typeof(AbpExceptionHandlingModule))]
- public class AbpAuditLoggingModule : AbpModule
+ public override void ConfigureServices(ServiceConfigurationContext context)
{
- public override void ConfigureServices(ServiceConfigurationContext context)
+ Configure(options =>
{
- Configure(options =>
- {
- options.IgnoredTypes.AddIfNotContains(typeof(CancellationToken));
- options.IgnoredTypes.AddIfNotContains(typeof(CancellationTokenSource));
- });
- }
+ options.IgnoredTypes.AddIfNotContains(typeof(CancellationToken));
+ options.IgnoredTypes.AddIfNotContains(typeof(CancellationTokenSource));
+ });
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditLog.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditLog.cs
index 8c308baec..62fe7456f 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditLog.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditLog.cs
@@ -1,122 +1,120 @@
using System;
using System.Collections.Generic;
-using Volo.Abp.Auditing;
using Volo.Abp.Data;
-namespace LINGYUN.Abp.AuditLogging
+namespace LINGYUN.Abp.AuditLogging;
+
+public class AuditLog : IHasExtraProperties
{
- public class AuditLog : IHasExtraProperties
- {
- public Guid Id { get; set; }
+ public Guid Id { get; set; }
- public string ApplicationName { get; set; }
+ public string? ApplicationName { get; set; }
- public Guid? UserId { get; set; }
+ public Guid? UserId { get; set; }
- public string UserName { get; set; }
+ public string? UserName { get; set; }
- public Guid? TenantId { get; set; }
+ public Guid? TenantId { get; set; }
- public string TenantName { get; set; }
+ public string? TenantName { get; set; }
- public Guid? ImpersonatorUserId { get; set; }
+ public Guid? ImpersonatorUserId { get; set; }
- public string ImpersonatorUserName { get; set; }
+ public string? ImpersonatorUserName { get; set; }
- public Guid? ImpersonatorTenantId { get; set; }
+ public Guid? ImpersonatorTenantId { get; set; }
- public string ImpersonatorTenantName { get; set; }
+ public string? ImpersonatorTenantName { get; set; }
- public DateTime ExecutionTime { get; set; }
+ public DateTime ExecutionTime { get; set; }
- public int ExecutionDuration { get; set; }
+ public int ExecutionDuration { get; set; }
- public string ClientIpAddress { get; set; }
+ public string? ClientIpAddress { get; set; }
- public string ClientName { get; set; }
+ public string? ClientName { get; set; }
- public string ClientId { get; set; }
+ public string? ClientId { get; set; }
- public string CorrelationId { get; set; }
+ public string? CorrelationId { get; set; }
- public string BrowserInfo { get; set; }
+ public string? BrowserInfo { get; set; }
- public string HttpMethod { get; set; }
+ public string? HttpMethod { get; set; }
- public string Url { get; set; }
+ public string? Url { get; set; }
- public string Exceptions { get; set; }
+ public string? Exceptions { get; set; }
- public string Comments { get; set; }
+ public string? Comments { get; set; }
- public int? HttpStatusCode { get; set; }
+ public int? HttpStatusCode { get; set; }
- public List EntityChanges { get; set; }
+ public List EntityChanges { get; set; }
- public List Actions { get; set; }
+ public List Actions { get; set; }
- public ExtraPropertyDictionary ExtraProperties { get; set; }
+ public ExtraPropertyDictionary ExtraProperties { get; set; }
- public AuditLog()
- {
- Actions = new List();
- EntityChanges = new List();
- ExtraProperties = new ExtraPropertyDictionary();
- }
+ public AuditLog()
+ {
+ Actions = new List();
+ EntityChanges = new List();
+ ExtraProperties = new ExtraPropertyDictionary();
+ }
- public AuditLog(
- Guid id,
- string applicationName,
- Guid? tenantId,
- string tenantName,
- Guid? userId,
- string userName,
- DateTime executionTime,
- int executionDuration,
- string clientIpAddress,
- string clientName,
- string clientId,
- string correlationId,
- string browserInfo,
- string httpMethod,
- string url,
- int? httpStatusCode,
- Guid? impersonatorUserId,
- string impersonatorUserName,
- Guid? impersonatorTenantId,
- string impersonatorTenantName,
- ExtraPropertyDictionary extraPropertyDictionary,
- List entityChanges,
- List actions,
- string exceptions,
- string comments)
- {
- Id = id;
- ApplicationName = applicationName;
- TenantId = tenantId;
- TenantName = tenantName;
- UserId = userId;
- UserName = userName;
- ExecutionTime = executionTime;
- ExecutionDuration = executionDuration;
- ClientIpAddress = clientIpAddress;
- ClientName = clientName;
- ClientId = clientId;
- CorrelationId = correlationId;
- BrowserInfo = browserInfo;
- HttpMethod = httpMethod;
- Url = url;
- HttpStatusCode = httpStatusCode;
- ImpersonatorUserId = impersonatorUserId;
- ImpersonatorUserName = impersonatorUserName;
- ImpersonatorTenantId = impersonatorTenantId;
- ImpersonatorTenantName = impersonatorTenantName;
-
- ExtraProperties = extraPropertyDictionary;
- EntityChanges = entityChanges;
- Actions = actions;
- Exceptions = exceptions;
- Comments = comments;
- }
+ public AuditLog(
+ Guid id,
+ string? applicationName,
+ Guid? tenantId,
+ string? tenantName,
+ Guid? userId,
+ string? userName,
+ DateTime executionTime,
+ int executionDuration,
+ string? clientIpAddress,
+ string? clientName,
+ string? clientId,
+ string? correlationId,
+ string? browserInfo,
+ string? httpMethod,
+ string? url,
+ int? httpStatusCode,
+ Guid? impersonatorUserId,
+ string? impersonatorUserName,
+ Guid? impersonatorTenantId,
+ string? impersonatorTenantName,
+ ExtraPropertyDictionary extraPropertyDictionary,
+ List entityChanges,
+ List actions,
+ string? exceptions,
+ string? comments)
+ {
+ Id = id;
+ ApplicationName = applicationName;
+ TenantId = tenantId;
+ TenantName = tenantName;
+ UserId = userId;
+ UserName = userName;
+ ExecutionTime = executionTime;
+ ExecutionDuration = executionDuration;
+ ClientIpAddress = clientIpAddress;
+ ClientName = clientName;
+ ClientId = clientId;
+ CorrelationId = correlationId;
+ BrowserInfo = browserInfo;
+ HttpMethod = httpMethod;
+ Url = url;
+ HttpStatusCode = httpStatusCode;
+ ImpersonatorUserId = impersonatorUserId;
+ ImpersonatorUserName = impersonatorUserName;
+ ImpersonatorTenantId = impersonatorTenantId;
+ ImpersonatorTenantName = impersonatorTenantName;
+
+ ExtraProperties = extraPropertyDictionary;
+ EntityChanges = entityChanges;
+ Actions = actions;
+ Exceptions = exceptions;
+ Comments = comments;
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditLogAction.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditLogAction.cs
index 7a44e3960..9e4d402b5 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditLogAction.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditLogAction.cs
@@ -2,47 +2,46 @@
using Volo.Abp.Auditing;
using Volo.Abp.Data;
-namespace LINGYUN.Abp.AuditLogging
+namespace LINGYUN.Abp.AuditLogging;
+
+[DisableAuditing]
+public class AuditLogAction : IHasExtraProperties
{
- [DisableAuditing]
- public class AuditLogAction : IHasExtraProperties
- {
- public Guid Id { get; set; }
+ public Guid Id { get; set; }
- public Guid? TenantId { get; set; }
+ public Guid? TenantId { get; set; }
- public Guid AuditLogId { get; set; }
+ public Guid AuditLogId { get; set; }
- public string ServiceName { get; set; }
+ public string ServiceName { get; set; }
- public string MethodName { get; set; }
+ public string MethodName { get; set; }
- public string Parameters { get; set; }
+ public string Parameters { get; set; }
- public DateTime ExecutionTime { get; set; }
+ public DateTime ExecutionTime { get; set; }
- public int ExecutionDuration { get; set; }
+ public int ExecutionDuration { get; set; }
- public ExtraPropertyDictionary ExtraProperties { get; set; }
+ public ExtraPropertyDictionary ExtraProperties { get; set; }
- public AuditLogAction()
- {
- ExtraProperties = new ExtraPropertyDictionary();
- }
+ public AuditLogAction()
+ {
+ ExtraProperties = new ExtraPropertyDictionary();
+ }
- public AuditLogAction(Guid id, Guid auditLogId, AuditLogActionInfo actionInfo, Guid? tenantId = null)
- {
+ public AuditLogAction(Guid id, Guid auditLogId, AuditLogActionInfo actionInfo, Guid? tenantId = null)
+ {
- Id = id;
- TenantId = tenantId;
- AuditLogId = auditLogId;
- ExecutionTime = actionInfo.ExecutionTime;
- ExecutionDuration = actionInfo.ExecutionDuration;
- ExtraProperties = new ExtraPropertyDictionary(actionInfo.ExtraProperties);
- ServiceName = actionInfo.ServiceName;
- MethodName = actionInfo.MethodName;
- Parameters = actionInfo.Parameters;
- // Parameters = actionInfo.Parameters.Length > 2000 ? "" : actionInfo.Parameters;
- }
+ Id = id;
+ TenantId = tenantId;
+ AuditLogId = auditLogId;
+ ExecutionTime = actionInfo.ExecutionTime;
+ ExecutionDuration = actionInfo.ExecutionDuration;
+ ExtraProperties = new ExtraPropertyDictionary(actionInfo.ExtraProperties);
+ ServiceName = actionInfo.ServiceName;
+ MethodName = actionInfo.MethodName;
+ Parameters = actionInfo.Parameters;
+ // Parameters = actionInfo.Parameters.Length > 2000 ? "" : actionInfo.Parameters;
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditingStore.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditingStore.cs
index 90054e157..660b820f8 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditingStore.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/AuditingStore.cs
@@ -2,22 +2,21 @@
using Volo.Abp.Auditing;
using Volo.Abp.DependencyInjection;
-namespace LINGYUN.Abp.AuditLogging
+namespace LINGYUN.Abp.AuditLogging;
+
+[Dependency(ReplaceServices = true)]
+public class AuditingStore : IAuditingStore, ITransientDependency
{
- [Dependency(ReplaceServices = true)]
- public class AuditingStore : IAuditingStore, ITransientDependency
- {
- private readonly IAuditLogManager _manager;
+ private readonly IAuditLogManager _manager;
- public AuditingStore(
- IAuditLogManager manager)
- {
- _manager = manager;
- }
+ public AuditingStore(
+ IAuditLogManager manager)
+ {
+ _manager = manager;
+ }
- public async virtual Task SaveAsync(AuditLogInfo auditInfo)
- {
- await _manager.SaveAsync(auditInfo);
- }
+ public async virtual Task SaveAsync(AuditLogInfo auditInfo)
+ {
+ await _manager.SaveAsync(auditInfo);
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultAuditLogManager.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultAuditLogManager.cs
index 2d8df99fe..f926ebe04 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultAuditLogManager.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultAuditLogManager.cs
@@ -8,89 +8,88 @@
using Volo.Abp.Auditing;
using Volo.Abp.DependencyInjection;
-namespace LINGYUN.Abp.AuditLogging
+namespace LINGYUN.Abp.AuditLogging;
+
+[Dependency(TryRegister = true)]
+public class DefaultAuditLogManager : IAuditLogManager, ISingletonDependency
{
- [Dependency(TryRegister = true)]
- public class DefaultAuditLogManager : IAuditLogManager, ISingletonDependency
- {
- public ILogger Logger { protected get; set; }
+ public ILogger Logger { protected get; set; }
- public DefaultAuditLogManager()
- {
- Logger = NullLogger.Instance;
- }
+ public DefaultAuditLogManager()
+ {
+ Logger = NullLogger.Instance;
+ }
- public virtual Task GetCountAsync(
- DateTime? startTime = null,
- DateTime? endTime = null,
- string httpMethod = null,
- string url = null,
- Guid? userId = null,
- string userName = null,
- string applicationName = null,
- string correlationId = null,
- string clientId = null,
- string clientIpAddress = null,
- int? maxExecutionDuration = null,
- int? minExecutionDuration = null,
- bool? hasException = null,
- HttpStatusCode? httpStatusCode = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- Logger.LogDebug("No audit log manager is available!");
- return Task.FromResult(0L);
- }
+ public virtual Task GetCountAsync(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string? httpMethod = null,
+ string? url = null,
+ Guid? userId = null,
+ string? userName = null,
+ string? applicationName = null,
+ string? correlationId = null,
+ string? clientId = null,
+ string? clientIpAddress = null,
+ int? maxExecutionDuration = null,
+ int? minExecutionDuration = null,
+ bool? hasException = null,
+ HttpStatusCode? httpStatusCode = null,
+ CancellationToken cancellationToken = default)
+ {
+ Logger.LogDebug("No audit log manager is available!");
+ return Task.FromResult(0L);
+ }
- public virtual Task> GetListAsync(
- string sorting = null,
- int maxResultCount = 50,
- int skipCount = 0,
- DateTime? startTime = null,
- DateTime? endTime = null,
- string httpMethod = null,
- string url = null,
- Guid? userId = null,
- string userName = null,
- string applicationName = null,
- string correlationId = null,
- string clientId = null,
- string clientIpAddress = null,
- int? maxExecutionDuration = null,
- int? minExecutionDuration = null,
- bool? hasException = null,
- HttpStatusCode? httpStatusCode = null,
- bool includeDetails = false,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- Logger.LogDebug("No audit log manager is available!");
- return Task.FromResult(new List());
- }
+ public virtual Task> GetListAsync(
+ string? sorting = null,
+ int maxResultCount = 50,
+ int skipCount = 0,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ string? httpMethod = null,
+ string? url = null,
+ Guid? userId = null,
+ string? userName = null,
+ string? applicationName = null,
+ string? correlationId = null,
+ string? clientId = null,
+ string? clientIpAddress = null,
+ int? maxExecutionDuration = null,
+ int? minExecutionDuration = null,
+ bool? hasException = null,
+ HttpStatusCode? httpStatusCode = null,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ Logger.LogDebug("No audit log manager is available!");
+ return Task.FromResult(new List());
+ }
- public virtual Task SaveAsync(
- AuditLogInfo auditInfo,
- CancellationToken cancellationToken = default)
- {
- Logger.LogDebug("No audit log manager is available and is written to the local log by default");
- Logger.LogInformation(auditInfo.ToString());
+ public virtual Task SaveAsync(
+ AuditLogInfo auditInfo,
+ CancellationToken cancellationToken = default)
+ {
+ Logger.LogDebug("No audit log manager is available and is written to the local log by default");
+ Logger.LogInformation(auditInfo.ToString());
- return Task.FromResult("");
- }
+ return Task.FromResult("");
+ }
- public virtual Task GetAsync(
- Guid id,
- bool includeDetails = false,
- CancellationToken cancellationToken = default)
- {
- Logger.LogDebug("No audit log manager is available!");
+ public virtual Task GetAsync(
+ Guid id,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ Logger.LogDebug("No audit log manager is available!");
- AuditLog auditLog = null;
- return Task.FromResult(auditLog);
- }
+ AuditLog? auditLog = null;
+ return Task.FromResult(auditLog!);
+ }
- public virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
- {
- Logger.LogDebug("No audit log manager is available!");
- return Task.CompletedTask;
- }
+ public virtual Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
+ {
+ Logger.LogDebug("No audit log manager is available!");
+ return Task.CompletedTask;
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultEntityChangeStore.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultEntityChangeStore.cs
index 792058963..31c13577d 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultEntityChangeStore.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultEntityChangeStore.cs
@@ -5,36 +5,53 @@
using Volo.Abp.Auditing;
using Volo.Abp.DependencyInjection;
-namespace LINGYUN.Abp.AuditLogging
+namespace LINGYUN.Abp.AuditLogging;
+
+[Dependency(TryRegister = true)]
+public class DefaultEntityChangeStore : IEntityChangeStore, ISingletonDependency
{
- [Dependency(TryRegister = true)]
- public class DefaultEntityChangeStore : IEntityChangeStore, ISingletonDependency
+ public Task GetAsync(Guid entityChangeId, CancellationToken cancellationToken = default)
{
- public Task GetAsync(Guid entityChangeId, CancellationToken cancellationToken = default)
- {
- EntityChange entityChange = null;
- return Task.FromResult(entityChange);
- }
+ EntityChange? entityChange = null;
+ return Task.FromResult(entityChange);
+ }
- public Task GetCountAsync(Guid? auditLogId = null, DateTime? startTime = null, DateTime? endTime = null, EntityChangeType? changeType = null, string entityId = null, string entityTypeFullName = null, CancellationToken cancellationToken = default)
- {
- return Task.FromResult(0L);
- }
+ public Task GetCountAsync(
+ Guid? auditLogId = null,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ EntityChangeType? changeType = null,
+ string? entityId = null,
+ string? entityTypeFullName = null,
+ CancellationToken cancellationToken = default)
+ {
+ return Task.FromResult(0L);
+ }
- public Task> GetListAsync(string sorting = null, int maxResultCount = 50, int skipCount = 0, Guid? auditLogId = null, DateTime? startTime = null, DateTime? endTime = null, EntityChangeType? changeType = null, string entityId = null, string entityTypeFullName = null, bool includeDetails = false, CancellationToken cancellationToken = default)
- {
- return Task.FromResult(new List());
- }
+ public Task> GetListAsync(
+ string? sorting = null,
+ int maxResultCount = 50,
+ int skipCount = 0,
+ Guid? auditLogId = null,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
+ EntityChangeType? changeType = null,
+ string? entityId = null,
+ string? entityTypeFullName = null,
+ bool includeDetails = false,
+ CancellationToken cancellationToken = default)
+ {
+ return Task.FromResult(new List());
+ }
- public Task GetWithUsernameAsync(Guid entityChangeId, CancellationToken cancellationToken = default)
- {
- EntityChangeWithUsername entityChange = null;
- return Task.FromResult(entityChange);
- }
+ public Task GetWithUsernameAsync(Guid entityChangeId, CancellationToken cancellationToken = default)
+ {
+ EntityChangeWithUsername? entityChange = null;
+ return Task.FromResult(entityChange!);
+ }
- public Task> GetWithUsernameAsync(string entityId, string entityTypeFullName, CancellationToken cancellationToken = default)
- {
- return Task.FromResult(new List());
- }
+ public Task> GetWithUsernameAsync(string entityId, string entityTypeFullName, CancellationToken cancellationToken = default)
+ {
+ return Task.FromResult(new List());
}
}
diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultSecurityLogManager.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultSecurityLogManager.cs
index 62341c4dd..48eee285b 100644
--- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultSecurityLogManager.cs
+++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging/LINGYUN/Abp/AuditLogging/DefaultSecurityLogManager.cs
@@ -7,81 +7,80 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.SecurityLog;
-namespace LINGYUN.Abp.AuditLogging
+namespace LINGYUN.Abp.AuditLogging;
+
+[Dependency(TryRegister = true)]
+public class DefaultSecurityLogManager : ISecurityLogManager, ISingletonDependency
{
- [Dependency(TryRegister = true)]
- public class DefaultSecurityLogManager : ISecurityLogManager, ISingletonDependency
- {
- public ILogger Logger { protected get; set; }
+ public ILogger Logger { protected get; set; }
- public DefaultSecurityLogManager()
- {
- Logger = NullLogger.Instance;
- }
+ public DefaultSecurityLogManager()
+ {
+ Logger = NullLogger.Instance;
+ }
- public Task GetCountAsync(
- DateTime? startTime = null,
- DateTime? endTime = null,
- string applicationName = null,
- string identity = null,
- string action = null,
- Guid? userId = null,
- string userName = null,
- string clientId = null,
- string clientIpAddress = null,
- string correlationId = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- Logger.LogDebug("No security log manager is available!");
- return Task.FromResult(0L);
- }
+ public Task