Files
server/src/Api/Models/Request/Accounts/SetKeyConnectorKeyRequestModel.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
793 B
C#
Raw Normal View History

2021-10-25 15:09:14 +02:00
using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities;
2021-10-25 15:09:14 +02:00
using Bit.Core.Enums;
2021-12-14 15:05:07 +00:00
namespace Bit.Api.Models.Request.Accounts
2021-10-25 15:09:14 +02:00
{
public class SetKeyConnectorKeyRequestModel
2021-10-25 15:09:14 +02:00
{
[Required]
public string Key { get; set; }
[Required]
public KeysRequestModel Keys { get; set; }
[Required]
public KdfType Kdf { get; set; }
[Required]
public int KdfIterations { get; set; }
[Required]
public string OrgIdentifier { get; set; }
public User ToUser(User existingUser)
{
existingUser.Kdf = Kdf;
existingUser.KdfIterations = KdfIterations;
existingUser.Key = Key;
Keys.ToUser(existingUser);
return existingUser;
}
}
}