mirror of
https://github.com/bitwarden/server
synced 2025-12-15 07:43:54 +00:00
* Send rotateable keyset on list webauthn keys * Implement basic prf key rotation * Add validator for webauthn rotation * Fix accounts controller tests * Add webauthn rotation validator tests * Introduce separate request model * Fix tests * Remove extra empty line * Remove filtering in validator * Don't send encrypted private key * Fix tests * Implement delegated webauthn db transactions * Add backward compatibility * Fix query not working * Update migration sql * Update dapper query * Remove unused helper * Rename webauthn to WebAuthnLogin * Fix linter errors * Fix tests * Fix tests
31 lines
969 B
C#
31 lines
969 B
C#
using Bit.Core.Auth.Entities;
|
|
using Bit.Core.Auth.Enums;
|
|
using Bit.Core.Models.Api;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Api.Auth.Models.Response.WebAuthn;
|
|
|
|
public class WebAuthnCredentialResponseModel : ResponseModel
|
|
{
|
|
private const string ResponseObj = "webauthnCredential";
|
|
|
|
public WebAuthnCredentialResponseModel(WebAuthnCredential credential) : base(ResponseObj)
|
|
{
|
|
Id = credential.Id.ToString();
|
|
Name = credential.Name;
|
|
PrfStatus = credential.GetPrfStatus();
|
|
EncryptedUserKey = credential.EncryptedUserKey;
|
|
EncryptedPublicKey = credential.EncryptedPublicKey;
|
|
}
|
|
|
|
public string Id { get; set; }
|
|
public string Name { get; set; }
|
|
public WebAuthnPrfStatus PrfStatus { get; set; }
|
|
[EncryptedString]
|
|
[EncryptedStringLength(2000)]
|
|
public string EncryptedUserKey { get; set; }
|
|
[EncryptedString]
|
|
[EncryptedStringLength(2000)]
|
|
public string EncryptedPublicKey { get; set; }
|
|
}
|