mirror of
https://github.com/bitwarden/server
synced 2026-01-01 16:13:33 +00:00
This reverts commit 92e511284b.
Merged without feature flag code and before QA could get their review done.
This commit is contained in:
committed by
GitHub
parent
92e511284b
commit
7eaca9bb7d
@@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Identity.Models.Request.Accounts;
|
||||
|
||||
public class PasswordPreloginRequestModel
|
||||
public class PreloginRequestModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
@@ -1,38 +0,0 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.KeyManagement.Models.Data;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Identity.Models.Response.Accounts;
|
||||
|
||||
public class PasswordPreloginResponseModel
|
||||
{
|
||||
public PasswordPreloginResponseModel(UserKdfInformation kdfInformation, string? salt = null)
|
||||
{
|
||||
// PM-28143 Cleanup
|
||||
Kdf = kdfInformation.Kdf;
|
||||
KdfIterations = kdfInformation.KdfIterations;
|
||||
KdfMemory = kdfInformation.KdfMemory;
|
||||
KdfParallelism = kdfInformation.KdfParallelism;
|
||||
// End Cleanup
|
||||
|
||||
KdfSettings = new KdfSettings()
|
||||
{
|
||||
KdfType = kdfInformation.Kdf,
|
||||
Iterations = kdfInformation.KdfIterations,
|
||||
Memory = kdfInformation.KdfMemory,
|
||||
Parallelism = kdfInformation.KdfParallelism,
|
||||
};
|
||||
Salt = salt;
|
||||
}
|
||||
|
||||
// Old Data Types
|
||||
public KdfType? Kdf { get; set; } // PM-28143 Remove with cleanup
|
||||
public int? KdfIterations { get; set; } // PM-28143 Remove with cleanup
|
||||
public int? KdfMemory { get; set; } // PM-28143 Remove with cleanup
|
||||
public int? KdfParallelism { get; set; } // PM-28143 Remove with cleanup
|
||||
|
||||
// New Data Types
|
||||
public KdfSettings? KdfSettings { get; set; } // PM-28143 With cleanup make this not nullish
|
||||
public string? Salt { get; set; } // PM-28143 With cleanup make this not nullish. Not used yet,
|
||||
// just the email from the request at this time.
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Identity.Models.Response.Accounts;
|
||||
|
||||
public class PreloginResponseModel
|
||||
{
|
||||
public PreloginResponseModel(UserKdfInformation kdfInformation)
|
||||
{
|
||||
Kdf = kdfInformation.Kdf;
|
||||
KdfIterations = kdfInformation.KdfIterations;
|
||||
KdfMemory = kdfInformation.KdfMemory;
|
||||
KdfParallelism = kdfInformation.KdfParallelism;
|
||||
}
|
||||
|
||||
public KdfType Kdf { get; set; }
|
||||
public int KdfIterations { get; set; }
|
||||
public int? KdfMemory { get; set; }
|
||||
public int? KdfParallelism { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user