mirror of
https://github.com/bitwarden/server
synced 2026-01-28 15:23:38 +00:00
* Added MasterPasswordUnlock to UserDecryptionOptions as part of identity response * Implement support for authentication data and unlock data in kdf change * Extract to kdf command and add tests * Fix namespace * Delete empty file * Fix build * Clean up tests * Fix tests * Add comments * Cleanup * Cleanup * Cleanup * Clean-up and fix build * Address feedback; force new parameters on KDF change request * Clean-up and add tests * Re-add logger * Update logger to interface * Clean up, remove Kdf Request Model * Remove kdf request model tests * Fix types in test * Address feedback to rename request model and re-add tests * Fix namespace * Move comments * Rename InnerKdfRequestModel to KdfRequestModel --------- Co-authored-by: Maciej Zieniuk <mzieniuk@bitwarden.com>
23 lines
669 B
C#
23 lines
669 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Bit.Core.KeyManagement.Models.Data;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Api.KeyManagement.Models.Requests;
|
|
|
|
public class MasterPasswordUnlockDataRequestModel
|
|
{
|
|
public required KdfRequestModel Kdf { get; init; }
|
|
[EncryptedString] public required string MasterKeyWrappedUserKey { get; init; }
|
|
[StringLength(256)] public required string Salt { get; init; }
|
|
|
|
public MasterPasswordUnlockData ToData()
|
|
{
|
|
return new MasterPasswordUnlockData
|
|
{
|
|
Kdf = Kdf.ToData(),
|
|
MasterKeyWrappedUserKey = MasterKeyWrappedUserKey,
|
|
Salt = Salt
|
|
};
|
|
}
|
|
}
|