1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-16 00:03:22 +00:00

[PM-4054] Rename Fido2Key to Fido2Credential (#2821)

* PM-4054 Renamed Fido2Key to Fido2Credential on the entire codebase

* PM-4054 Renamed file Fido2KeyApi to Fido2CredentialApi
This commit is contained in:
Federico Maccaroni
2023-10-12 16:51:19 -03:00
committed by GitHub
parent bb2f1f0f5f
commit f2936c95fa
15 changed files with 56 additions and 56 deletions

View File

@@ -121,6 +121,6 @@ namespace Bit.Core.Models.View
public bool IsClonable => OrganizationId is null;
public bool HasFido2Key => Type == CipherType.Login && Login?.HasFido2Keys == true;
public bool HasFido2Credential => Type == CipherType.Login && Login?.HasFido2Credentials == true;
}
}

View File

@@ -3,13 +3,13 @@ using Bit.Core.Enums;
namespace Bit.Core.Models.View
{
public class Fido2KeyView : ItemView, ILaunchableView
public class Fido2CredentialView : ItemView, ILaunchableView
{
public string CredentialId { get; set; }
public string Discoverable { get; set; }
public string KeyType { get; set; } = Constants.DefaultFido2KeyType;
public string KeyAlgorithm { get; set; } = Constants.DefaultFido2KeyAlgorithm;
public string KeyCurve { get; set; } = Constants.DefaultFido2KeyCurve;
public string KeyType { get; set; } = Constants.DefaultFido2CredentialType;
public string KeyAlgorithm { get; set; } = Constants.DefaultFido2CredentialAlgorithm;
public string KeyCurve { get; set; } = Constants.DefaultFido2CredentialCurve;
public string KeyValue { get; set; }
public string RpId { get; set; }
public string RpName { get; set; }
@@ -23,6 +23,6 @@ namespace Bit.Core.Models.View
public bool CanLaunch => !string.IsNullOrEmpty(RpId);
public string LaunchUri => $"https://{RpId}";
public bool IsUniqueAgainst(Fido2KeyView fido2View) => fido2View?.RpId != RpId || fido2View?.UserName != UserName;
public bool IsUniqueAgainst(Fido2CredentialView fido2View) => fido2View?.RpId != RpId || fido2View?.UserName != UserName;
}
}

View File

@@ -20,7 +20,7 @@ namespace Bit.Core.Models.View
public DateTime? PasswordRevisionDate { get; set; }
public string Totp { get; set; }
public List<LoginUriView> Uris { get; set; }
public List<Fido2KeyView> Fido2Keys { get; set; }
public List<Fido2CredentialView> Fido2Credentials { get; set; }
public string Uri => HasUris ? Uris[0].Uri : null;
public string MaskedPassword => Password != null ? "••••••••" : null;
@@ -28,8 +28,8 @@ namespace Bit.Core.Models.View
public bool CanLaunch => HasUris && Uris.Any(u => u.CanLaunch);
public string LaunchUri => HasUris ? Uris.FirstOrDefault(u => u.CanLaunch)?.LaunchUri : null;
public bool HasUris => (Uris?.Count ?? 0) > 0;
public bool HasFido2Keys => Fido2Keys?.Any() == true;
public Fido2KeyView MainFido2Key => HasFido2Keys ? Fido2Keys[0] : null;
public bool HasFido2Credentials => Fido2Credentials?.Any() == true;
public Fido2CredentialView MainFido2Credential => HasFido2Credentials ? Fido2Credentials[0] : null;
public override List<KeyValuePair<string, LinkedIdType>> LinkedFieldOptions
{