From 57fa5ce0123ab8477b95267123586aa5679e9997 Mon Sep 17 00:00:00 2001 From: MayueCif Date: Wed, 4 Mar 2026 09:04:22 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E8=B0=83=E6=95=B4SessionId=E5=92=8CDescr?= =?UTF-8?q?iption=E4=B8=BA=E5=8F=AF=E7=A9=BA=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将DeviceFlowCodes和PersistedGrant中的SessionId与Description属性由非空字符串改为可空字符串(string?),并移除默认空字符串赋值,以更准确表达属性可为null的业务场景。 --- .../Entities/DeviceFlowCodes.cs | 4 ++-- .../Entities/PersistedGrant.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs index 4c97be3f0..05d54f9ab 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs @@ -35,7 +35,7 @@ public class DeviceFlowCodes : FullAggregateRoot /// /// The session identifier. /// - public string SessionId { get; private set; } = string.Empty; + public string? SessionId { get; private set; } /// /// Gets or sets the client identifier. @@ -51,7 +51,7 @@ public class DeviceFlowCodes : FullAggregateRoot /// /// The description. /// - public string Description { get; private set; } = string.Empty; + public string? Description { get; private set; } /// /// Gets or sets the expiration. diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs index 3fb9903d6..01f2d90f2 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs @@ -11,11 +11,11 @@ public class PersistedGrant : FullAggregateRoot public string SubjectId { get; private set; } = string.Empty; - public string SessionId { get; private set; } = string.Empty; + public string? SessionId { get; private set; } public string ClientId { get; private set; } = string.Empty; - public string Description { get; private set; } = string.Empty; + public string? Description { get; private set; } public DateTime? Expiration { get; private set; } From fb31b9e49b2d0b3e25f3a353e8d9898004ada5a7 Mon Sep 17 00:00:00 2001 From: MayueCif Date: Wed, 4 Mar 2026 14:24:23 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E7=A7=BB=E9=99=A4DeviceFlowCodes?= =?UTF-8?q?=E4=B8=8EPersistedGrant=E7=9A=84=E8=81=9A=E5=90=88=E6=A0=B9?= =?UTF-8?q?=E7=BB=A7=E6=89=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将DeviceFlowCodes和PersistedGrant类从继承FullAggregateRoot改为普通类,去除了聚合根相关功能,简化了实体结构或为领域模型调整做准备。 --- .../Entities/DeviceFlowCodes.cs | 2 +- .../Entities/PersistedGrant.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs index 05d54f9ab..7f1fc5716 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs @@ -3,7 +3,7 @@ namespace Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain.Entities; -public class DeviceFlowCodes : FullAggregateRoot +public class DeviceFlowCodes { /// /// Gets or sets the device code. diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs index 01f2d90f2..cfdad8c82 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs @@ -3,7 +3,7 @@ namespace Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain.Entities; -public class PersistedGrant : FullAggregateRoot +public class PersistedGrant { public string Key { get; private set; } = null!; From 9a6176188b9704704cf0676b080238681fe38df8 Mon Sep 17 00:00:00 2001 From: MayueCif Date: Wed, 4 Mar 2026 14:42:50 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E7=A7=BB=E9=99=A4DeviceFlowCodes?= =?UTF-8?q?=E5=92=8CPersistedGrant=E7=9A=84=E5=91=BD=E5=90=8D=E7=A9=BA?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除了 DeviceFlowCodes.cs 和 PersistedGrant.cs 文件中的命名空间声明,使这两个类不再属于原有的命名空间。此更改可能用于调整类的作用域或为后续的命名空间重构做准备。 --- .../Entities/DeviceFlowCodes.cs | 2 -- .../Entities/PersistedGrant.cs | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs index 7f1fc5716..72c112383 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs @@ -1,8 +1,6 @@ // Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. -namespace Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain.Entities; - public class DeviceFlowCodes { /// diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs index cfdad8c82..f92867608 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs @@ -1,8 +1,6 @@ // Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. -namespace Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain.Entities; - public class PersistedGrant { public string Key { get; private set; } = null!; From cfd79bc21c1388fbf00c8af7f3d10fca6de9d6c9 Mon Sep 17 00:00:00 2001 From: MayueCif Date: Wed, 4 Mar 2026 15:07:54 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E7=AE=80=E5=8C=96PersistedGrant=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E9=85=8D=E7=BD=AE=E5=8F=8A=E8=B0=83=E6=95=B4=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E7=A9=BA=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正版权声明并增加MIT License说明。将命名空间从Oracle专用调整为通用版本。简化SubjectId、SessionId、Description字段配置,移除IsRequired(false),仅保留最大长度设置,默认可空。移除了CreationTime的IsRequired()配置,使配置更简洁且符合EF Core默认行为。 --- .../PersistedGrantEntityTypeConfiguration.cs | 3 +-- .../PersistedGrantEntityTypeConfiguration.cs | 1 - .../PersistedGrantEntityTypeConfiguration.cs | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs index 538d3b3e9..0a6f79975 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) MASA Stack All rights reserved. +// Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle.EntityConfigurations; @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100).IsRequired(false); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200).IsRequired(false); - builder.Property(x => x.CreationTime).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer builder.Property(x => x.Data).HasMaxLength(50000).IsRequired(); diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs index cb923d693..8c9e41d56 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); - builder.Property(x => x.CreationTime).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer builder.Property(x => x.Data).HasMaxLength(50000).IsRequired(); diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs index 3bf7724c7..003eda772 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) MASA Stack All rights reserved. +// Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.EntityConfigurations; @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); - builder.Property(x => x.CreationTime).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer builder.Property(x => x.Data).HasMaxLength(50000).IsRequired(); From 7db3fc9fd2cc61757a6a88ca6b67dbd11cbc0322 Mon Sep 17 00:00:00 2001 From: MayueCif Date: Wed, 4 Mar 2026 15:18:04 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E8=B0=83=E6=95=B4DeviceFlowCodes?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E9=85=8D=E7=BD=AE=E5=8F=8A=E7=89=88=E6=9D=83?= =?UTF-8?q?=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完善MIT License声明,统一命名空间为通用EntityConfigurations。优化字段配置,移除部分IsRequired(false)和CreationTime配置,简化字段声明,提升代码规范性与可维护性。 --- .../DeviceFlowCodesEntityTypeConfiguration.cs | 3 +-- .../DeviceFlowCodesEntityTypeConfiguration.cs | 1 - .../DeviceFlowCodesEntityTypeConfiguration.cs | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs index d036bd954..e535281d2 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) MASA Stack All rights reserved. +// Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle.EntityConfigurations; @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100).IsRequired(false); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200).IsRequired(false); - builder.Property(x => x.CreationTime).IsRequired(); builder.Property(x => x.Expiration).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs index 14ec6612e..9842e0ecd 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); - builder.Property(x => x.CreationTime).IsRequired(); builder.Property(x => x.Expiration).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs index 719ca42ed..b31c9c59c 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) MASA Stack All rights reserved. +// Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.EntityConfigurations; @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); - builder.Property(x => x.CreationTime).IsRequired(); builder.Property(x => x.Expiration).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer From 8a6c5c57ef35839a7250430f9643ec87d0d16aa9 Mon Sep 17 00:00:00 2001 From: MayueCif Date: Thu, 5 Mar 2026 11:40:45 +0800 Subject: [PATCH 06/10] =?UTF-8?q?Revert=20"=E7=AE=80=E5=8C=96PersistedGran?= =?UTF-8?q?t=E5=AE=9E=E4=BD=93=E9=85=8D=E7=BD=AE=E5=8F=8A=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit cfd79bc21c1388fbf00c8af7f3d10fca6de9d6c9. --- .../PersistedGrantEntityTypeConfiguration.cs | 3 ++- .../PersistedGrantEntityTypeConfiguration.cs | 1 + .../PersistedGrantEntityTypeConfiguration.cs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs index 0a6f79975..538d3b3e9 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) MASA Stack All rights reserved. +// Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle.EntityConfigurations; @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100).IsRequired(false); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200).IsRequired(false); + builder.Property(x => x.CreationTime).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer builder.Property(x => x.Data).HasMaxLength(50000).IsRequired(); diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs index 8c9e41d56..cb923d693 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); + builder.Property(x => x.CreationTime).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer builder.Property(x => x.Data).HasMaxLength(50000).IsRequired(); diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs index 003eda772..3bf7724c7 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) MASA Stack All rights reserved. +// Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.EntityConfigurations; @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); + builder.Property(x => x.CreationTime).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer builder.Property(x => x.Data).HasMaxLength(50000).IsRequired(); From b2344d582191c8554ea2da07bd2de507d854c2a0 Mon Sep 17 00:00:00 2001 From: MayueCif Date: Thu, 5 Mar 2026 11:46:18 +0800 Subject: [PATCH 07/10] =?UTF-8?q?Revert=20"=E8=B0=83=E6=95=B4DeviceFlowCod?= =?UTF-8?q?es=E5=AE=9E=E4=BD=93=E9=85=8D=E7=BD=AE=E5=8F=8A=E7=89=88?= =?UTF-8?q?=E6=9D=83=E5=A3=B0=E6=98=8E"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7db3fc9fd2cc61757a6a88ca6b67dbd11cbc0322. --- .../DeviceFlowCodesEntityTypeConfiguration.cs | 3 ++- .../DeviceFlowCodesEntityTypeConfiguration.cs | 1 + .../DeviceFlowCodesEntityTypeConfiguration.cs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs index e535281d2..d036bd954 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) MASA Stack All rights reserved. +// Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle.EntityConfigurations; @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100).IsRequired(false); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200).IsRequired(false); + builder.Property(x => x.CreationTime).IsRequired(); builder.Property(x => x.Expiration).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs index 9842e0ecd..14ec6612e 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); + builder.Property(x => x.CreationTime).IsRequired(); builder.Property(x => x.Expiration).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs index b31c9c59c..719ca42ed 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) MASA Stack All rights reserved. +// Copyright (c) MASA Stack All rights reserved. // Licensed under the MIT License. See LICENSE.txt in the project root for license information. namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.EntityConfigurations; @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); + builder.Property(x => x.CreationTime).IsRequired(); builder.Property(x => x.Expiration).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer From f886a78e45f8c8db2fb4e0227edb02bc15323020 Mon Sep 17 00:00:00 2001 From: MayueCif Date: Thu, 5 Mar 2026 11:50:11 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=B8=BADeviceFlowCodes=E5=92=8CPersiste?= =?UTF-8?q?dGrant=E6=B7=BB=E5=8A=A0CreationTime=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在DeviceFlowCodes和PersistedGrant类中新增了CreationTime属性,用于记录对象的创建时间,提升了数据追踪和审计能力。 --- .../Entities/DeviceFlowCodes.cs | 8 ++++++++ .../Entities/PersistedGrant.cs | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs index 72c112383..a737ef136 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs @@ -51,6 +51,14 @@ public class DeviceFlowCodes /// public string? Description { get; private set; } + /// + /// Gets or sets the creation time. + /// + /// + /// The creation time. + /// + public DateTime CreationTime { get; set; } + /// /// Gets or sets the expiration. /// diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs index f92867608..af811883c 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs @@ -15,6 +15,8 @@ public class PersistedGrant public string? Description { get; private set; } + public DateTime CreationTime { get; set; } + public DateTime? Expiration { get; private set; } public DateTime? ConsumedTime { get; private set; } From c74f08919d60b20b4b6b5cf944292ec617d5c7b1 Mon Sep 17 00:00:00 2001 From: MayueCif Date: Thu, 5 Mar 2026 13:29:29 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E4=B8=BADeviceFlowCodes=E5=92=8CPersiste?= =?UTF-8?q?dGrant=E9=85=8D=E7=BD=AECreationTime=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在DeviceFlowCodesEntityTypeConfiguration和PersistedGrantEntityTypeConfiguration中,新增了对CreationTime属性的IsRequired()配置,确保该字段在数据库中不能为空,以提升数据完整性和一致性。 --- .../DeviceFlowCodesEntityTypeConfiguration.cs | 1 + .../PersistedGrantEntityTypeConfiguration.cs | 1 + .../DeviceFlowCodesEntityTypeConfiguration.cs | 1 + .../PersistedGrantEntityTypeConfiguration.cs | 1 + .../DeviceFlowCodesEntityTypeConfiguration.cs | 1 + .../PersistedGrantEntityTypeConfiguration.cs | 1 + 6 files changed, 6 insertions(+) diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs index e535281d2..ae9593826 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100).IsRequired(false); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200).IsRequired(false); + builder.Property(x => x.CreationTime).IsRequired(); builder.Property(x => x.Expiration).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs index 0a6f79975..5aeb657fb 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100).IsRequired(false); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200).IsRequired(false); + builder.Property(x => x.CreationTime).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer builder.Property(x => x.Data).HasMaxLength(50000).IsRequired(); diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs index 9842e0ecd..14ec6612e 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); + builder.Property(x => x.CreationTime).IsRequired(); builder.Property(x => x.Expiration).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs index 8c9e41d56..cb923d693 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); + builder.Property(x => x.CreationTime).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer builder.Property(x => x.Data).HasMaxLength(50000).IsRequired(); diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs index b31c9c59c..a5492686e 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/DeviceFlowCodesEntityTypeConfiguration.cs @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); + builder.Property(x => x.CreationTime).IsRequired(); builder.Property(x => x.Expiration).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer diff --git a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs index 003eda772..e56e5cbe2 100644 --- a/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs +++ b/src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/EntityConfigurations/PersistedGrantEntityTypeConfiguration.cs @@ -13,6 +13,7 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SessionId).HasMaxLength(100); builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); builder.Property(x => x.Description).HasMaxLength(200); + builder.Property(x => x.CreationTime).IsRequired(); // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer builder.Property(x => x.Data).HasMaxLength(50000).IsRequired(); From 0b1c579c67eb2cd4db2534b11bba9e485a95c50d Mon Sep 17 00:00:00 2001 From: MayueCif Date: Thu, 5 Mar 2026 13:44:47 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E5=B0=86CreationTime=E5=B1=9E=E6=80=A7se?= =?UTF-8?q?tter=E6=94=B9=E4=B8=BAprivate=E6=8F=90=E5=8D=87=E5=B0=81?= =?UTF-8?q?=E8=A3=85=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将DeviceFlowCodes和PersistedGrant类中的CreationTime属性的setter从public改为private,防止外部直接修改创建时间,增强了数据的封装性和安全性。 --- .../Entities/DeviceFlowCodes.cs | 2 +- .../Entities/PersistedGrant.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs index a737ef136..34ebb029a 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs @@ -57,7 +57,7 @@ public class DeviceFlowCodes /// /// The creation time. /// - public DateTime CreationTime { get; set; } + public DateTime CreationTime { get; private set; } /// /// Gets or sets the expiration. diff --git a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs index af811883c..b2f0ab944 100644 --- a/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs +++ b/src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs @@ -15,7 +15,7 @@ public class PersistedGrant public string? Description { get; private set; } - public DateTime CreationTime { get; set; } + public DateTime CreationTime { get; private set; } public DateTime? Expiration { get; private set; }