1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-05 10:03:26 +00:00

Password reprompt (#1365)

* Make card number hidden

* Add support for password reprompt

* Rename PasswordPrompt to Reprompt

* Protect autofill

* Use Enums.CipherRepromptType

* Fix iOS not building

* Protect iOS autofill

* Update to match jslib

* Fix failing build
This commit is contained in:
Oscar Hinton
2021-05-21 15:13:54 +02:00
committed by GitHub
parent e61bcd2785
commit 976eeab6d7
36 changed files with 401 additions and 55 deletions

View File

@@ -1,4 +1,5 @@
using Bit.Core.Models.Data;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
using Bit.Core.Models.View;
using System;
using System.Collections.Generic;
@@ -30,6 +31,7 @@ namespace Bit.Core.Models.Domain
RevisionDate = obj.RevisionDate;
CollectionIds = obj.CollectionIds != null ? new HashSet<string>(obj.CollectionIds) : null;
LocalData = localData;
Reprompt = obj.Reprompt;
switch (Type)
{
@@ -75,8 +77,8 @@ namespace Bit.Core.Models.Domain
public List<Field> Fields { get; set; }
public List<PasswordHistory> PasswordHistory { get; set; }
public HashSet<string> CollectionIds { get; set; }
public DateTime? DeletedDate { get; set; }
public CipherRepromptType Reprompt { get; set; }
public async Task<CipherView> DecryptAsync()
{
@@ -167,7 +169,8 @@ namespace Bit.Core.Models.Domain
RevisionDate = RevisionDate,
Type = Type,
CollectionIds = CollectionIds.ToList(),
DeletedDate = DeletedDate
DeletedDate = DeletedDate,
Reprompt = Reprompt,
};
BuildDataModel(this, c, new HashSet<string>
{