1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-08 11:33:31 +00:00

save password history changes

This commit is contained in:
Kyle Spearrin
2018-07-30 16:15:36 -04:00
parent 4d08ce90cc
commit a9a33ad71e
5 changed files with 62 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ namespace Bit.App.Models.Api
Uris = cipher.Login.Uris?.Select(u => new LoginUriType(u));
Username = cipher.Login.Username?.EncryptedString;
Password = cipher.Login.Password?.EncryptedString;
PasswordRevisionDate = cipher.Login.PasswordRevisionDate;
Totp = cipher.Login.Totp?.EncryptedString;
}

View File

@@ -20,6 +20,11 @@ namespace Bit.App.Models.Api
Fields = cipher.Fields.Select(f => new FieldType(f));
}
if(cipher.PasswordHistory != null)
{
PasswordHistory = cipher.PasswordHistory.Select(h => new PasswordHistoryRequest(h));
}
switch(Type)
{
case CipherType.Login:
@@ -46,7 +51,7 @@ namespace Bit.App.Models.Api
public string Name { get; set; }
public string Notes { get; set; }
public IEnumerable<FieldType> Fields { get; set; }
public IEnumerable<PasswordHistoryResponse> PasswordHistory { get; set; }
public IEnumerable<PasswordHistoryRequest> PasswordHistory { get; set; }
public LoginType Login { get; set; }
public CardType Card { get; set; }

View File

@@ -2,6 +2,12 @@
{
public class PasswordHistoryRequest
{
public PasswordHistoryRequest(PasswordHistory ph)
{
Password = ph.Password?.EncryptedString;
LastUsedDate = ph.LastUsedDate;
}
public string Password { get; set; }
public System.DateTime LastUsedDate { get; set; }
}