mirror of
https://github.com/bitwarden/server.git
synced 2026-02-01 06:33:17 +08:00
* V2 prep, rename existing SSO JIT MP command to V1 * set initial master password for account registraton V2 * later removel docs * TDE MP onboarding split * revert separate TDE onboarding controller api * Server side hash of the user master password hash * use `ValidationResult` instead for validation errors * unit test coverage * integration test coverage * update sql migration script date * revert validate password change * better requests validation * explicit error message when org sso identifier invalid * more unit test coverage * renamed onboarding to set, hash naming clarifications * update db sql script, formatting * use raw json as request instead of request models for integration test * v1 integration test coverage * change of name
27 lines
707 B
C#
27 lines
707 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; }
|
|
[Required]
|
|
[EncryptedString]
|
|
public required string MasterKeyWrappedUserKey { get; init; }
|
|
[Required]
|
|
[StringLength(256)]
|
|
public required string Salt { get; init; }
|
|
|
|
public MasterPasswordUnlockData ToData()
|
|
{
|
|
return new MasterPasswordUnlockData
|
|
{
|
|
Kdf = Kdf.ToData(),
|
|
MasterKeyWrappedUserKey = MasterKeyWrappedUserKey,
|
|
Salt = Salt
|
|
};
|
|
}
|
|
}
|