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 bc0d328c3..5bc10a57c 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
@@ -118,6 +118,7 @@ public class SecurityLogManager : ISecurityLogManager, ITransientDependency
userName,
clientId,
correlationId,
+ clientIpAddress,
includeDetails,
cancellationToken);
@@ -148,6 +149,7 @@ public class SecurityLogManager : ISecurityLogManager, ITransientDependency
userName,
clientId,
correlationId,
+ clientIpAddress,
cancellationToken);
}
}
diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IIdentitySessionStore.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IIdentitySessionStore.cs
index e49c0fa02..4a4596e8d 100644
--- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IIdentitySessionStore.cs
+++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IIdentitySessionStore.cs
@@ -21,6 +21,7 @@ public interface IIdentitySessionStore
/// ip地址
/// 登录时间
/// 上次访问时间
+ /// IP地域
/// 租户id
///
/// 创建完成的
@@ -33,6 +34,7 @@ public interface IIdentitySessionStore
string ipAddresses,
DateTime signedIn,
DateTime? lastAccessed = null,
+ string ipRegion = null,
Guid? tenantId = null,
CancellationToken cancellationToken = default);
///
diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionManager.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionManager.cs
index 8ab6cdc32..c4db147aa 100644
--- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionManager.cs
+++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionManager.cs
@@ -68,6 +68,7 @@ public class IdentitySessionManager : DomainService, IIdentitySessionManager
clientIpAddress,
Clock.Now,
Clock.Now,
+ deviceInfo.IpRegion,
tenantId,
cancellationToken);
diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionStore.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionStore.cs
index 626a86d0d..dcf4c5e26 100644
--- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionStore.cs
+++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Session/IdentitySessionStore.cs
@@ -4,6 +4,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp;
+using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
using Volo.Abp.Identity;
@@ -35,6 +36,7 @@ public class IdentitySessionStore : IIdentitySessionStore, ITransientDependency
string ipAddresses,
DateTime signedIn,
DateTime? lastAccessed = null,
+ string ipRegion = null,
Guid? tenantId = null,
CancellationToken cancellationToken = default)
{
@@ -53,6 +55,10 @@ public class IdentitySessionStore : IIdentitySessionStore, ITransientDependency
signedIn,
lastAccessed
);
+ if (!ipRegion.IsNullOrWhiteSpace())
+ {
+ identitySession.SetProperty("Location", ipRegion);
+ }
identitySession = await IdentitySessionRepository.InsertAsync(identitySession, cancellationToken: cancellationToken);