mirror of
https://github.com/bitwarden/server.git
synced 2025-07-07 02:52:50 -05:00
public and private keys added to db and user domain. added account APIs got getting and putting keys.
This commit is contained in:
23
src/Api/Models/Response/KeysResponseModel.cs
Normal file
23
src/Api/Models/Response/KeysResponseModel.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using Bit.Core.Domains;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
{
|
||||
public class KeysResponseModel : ResponseModel
|
||||
{
|
||||
public KeysResponseModel(User user)
|
||||
: base("keys")
|
||||
{
|
||||
if(user == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
}
|
||||
|
||||
PublicKey = user.PublicKey;
|
||||
PrivateKey = user.PrivateKey;
|
||||
}
|
||||
|
||||
public string PublicKey { get; set; }
|
||||
public string PrivateKey { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user