From 227f3a01df1d62c65893782b2eba583b6d77e037 Mon Sep 17 00:00:00 2001 From: Patrick Pimentel Date: Tue, 30 Dec 2025 22:38:08 -0500 Subject: [PATCH] comment(register): [PM-27084] Account Register Uses New Data Types - Added comments to clarify how these data types should be used. --- .../Request/MasterPasswordAuthenticationDataRequestModel.cs | 2 +- .../Api/Request/MasterPasswordUnlockDataRequestModel.cs | 4 ++++ .../Models/Data/MasterPasswordAuthenticationData.cs | 5 +++++ .../Data/MasterPasswordUnlockAndAuthenticationData.cs | 6 ++++++ .../KeyManagement/Models/Data/MasterPasswordUnlockData.cs | 5 +++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Core/KeyManagement/Models/Api/Request/MasterPasswordAuthenticationDataRequestModel.cs b/src/Core/KeyManagement/Models/Api/Request/MasterPasswordAuthenticationDataRequestModel.cs index f89c870eff..f1160782a2 100644 --- a/src/Core/KeyManagement/Models/Api/Request/MasterPasswordAuthenticationDataRequestModel.cs +++ b/src/Core/KeyManagement/Models/Api/Request/MasterPasswordAuthenticationDataRequestModel.cs @@ -5,7 +5,7 @@ namespace Bit.Core.KeyManagement.Models.Api.Request; /// /// Use this datatype when interfacing with requests to create a separation of concern. -/// See to +/// See to use for commands, queries, services. /// public class MasterPasswordAuthenticationDataRequestModel { diff --git a/src/Core/KeyManagement/Models/Api/Request/MasterPasswordUnlockDataRequestModel.cs b/src/Core/KeyManagement/Models/Api/Request/MasterPasswordUnlockDataRequestModel.cs index 9b4e9599d3..e3dfd2fb79 100644 --- a/src/Core/KeyManagement/Models/Api/Request/MasterPasswordUnlockDataRequestModel.cs +++ b/src/Core/KeyManagement/Models/Api/Request/MasterPasswordUnlockDataRequestModel.cs @@ -4,6 +4,10 @@ using Bit.Core.Utilities; namespace Bit.Core.KeyManagement.Models.Api.Request; +/// +/// Use this datatype when interfacing with requests to create a separation of concern. +/// See to use for commands, queries, services. +/// public class MasterPasswordUnlockDataRequestModel { public required KdfRequestModel Kdf { get; init; } diff --git a/src/Core/KeyManagement/Models/Data/MasterPasswordAuthenticationData.cs b/src/Core/KeyManagement/Models/Data/MasterPasswordAuthenticationData.cs index 1bc7006cef..6e53dfa744 100644 --- a/src/Core/KeyManagement/Models/Data/MasterPasswordAuthenticationData.cs +++ b/src/Core/KeyManagement/Models/Data/MasterPasswordAuthenticationData.cs @@ -1,8 +1,13 @@ using Bit.Core.Entities; using Bit.Core.Exceptions; +using Bit.Core.KeyManagement.Models.Api.Request; namespace Bit.Core.KeyManagement.Models.Data; +/// +/// Use this datatype when interfacing with commands, queries, services to create a separation of concern. +/// See to use for requests. +/// public class MasterPasswordAuthenticationData { public required KdfSettings Kdf { get; init; } diff --git a/src/Core/KeyManagement/Models/Data/MasterPasswordUnlockAndAuthenticationData.cs b/src/Core/KeyManagement/Models/Data/MasterPasswordUnlockAndAuthenticationData.cs index ad3a0b692b..e60cb3bb95 100644 --- a/src/Core/KeyManagement/Models/Data/MasterPasswordUnlockAndAuthenticationData.cs +++ b/src/Core/KeyManagement/Models/Data/MasterPasswordUnlockAndAuthenticationData.cs @@ -4,6 +4,12 @@ using Bit.Core.Enums; namespace Bit.Core.KeyManagement.Models.Data; +/// +/// Probably shouldn't be used as we want to make sure that the unlock data and authentication data +/// can use separate kdf settings. +/// +/// Should be cleaned up in the near future. +/// public class MasterPasswordUnlockAndAuthenticationData { public KdfType KdfType { get; set; } diff --git a/src/Core/KeyManagement/Models/Data/MasterPasswordUnlockData.cs b/src/Core/KeyManagement/Models/Data/MasterPasswordUnlockData.cs index cb18ed2a78..f8139cba99 100644 --- a/src/Core/KeyManagement/Models/Data/MasterPasswordUnlockData.cs +++ b/src/Core/KeyManagement/Models/Data/MasterPasswordUnlockData.cs @@ -1,8 +1,13 @@ using Bit.Core.Entities; using Bit.Core.Exceptions; +using Bit.Core.KeyManagement.Models.Api.Request; namespace Bit.Core.KeyManagement.Models.Data; +/// +/// Use this datatype when interfacing with commands, queries, services to create a separation of concern. +/// See to use for requests. +/// public class MasterPasswordUnlockData { public required KdfSettings Kdf { get; init; }