Skip to content

Commit

Permalink
[PM-3980] Added creationDate property to the Fido2Key object (#3279)
Browse files Browse the repository at this point in the history
* Added creationDate property to the Fido2Key object

* Fixed lint issues

* fixed comments

* made createionDate required
  • Loading branch information
gbubemismith authored Sep 20, 2023
1 parent 5857171 commit 4ea1bf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Api/Vault/Models/CipherFido2KeyModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Bit.Core.Utilities;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities;
using Bit.Core.Vault.Models.Data;

namespace Bit.Api.Vault.Models;
Expand All @@ -20,6 +21,7 @@ public CipherFido2KeyModel(CipherLoginFido2KeyData data)
UserDisplayName = data.UserDisplayName;
Counter = data.Counter;
Discoverable = data.Discoverable;
CreationDate = data.CreationDate;
}

[EncryptedString]
Expand Down Expand Up @@ -55,6 +57,8 @@ public CipherFido2KeyModel(CipherLoginFido2KeyData data)
[EncryptedString]
[EncryptedStringLength(1000)]
public string Discoverable { get; set; }
[Required]
public DateTime CreationDate { get; set; }

public CipherLoginFido2KeyData ToCipherLoginFido2KeyData()
{
Expand All @@ -70,7 +74,8 @@ public CipherLoginFido2KeyData ToCipherLoginFido2KeyData()
UserHandle = UserHandle,
UserDisplayName = UserDisplayName,
Counter = Counter,
Discoverable = Discoverable
Discoverable = Discoverable,
CreationDate = CreationDate
};
}
}
Expand Down
1 change: 1 addition & 0 deletions src/Core/Vault/Models/Data/CipherLoginFido2KeyData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ public CipherLoginFido2KeyData() { }
public string UserDisplayName { get; set; }
public string Counter { get; set; }
public string Discoverable { get; set; }
public DateTime CreationDate { get; set; }
}

0 comments on commit 4ea1bf3

Please sign in to comment.