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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user