From 9ac4a5921a2eef20668a09ae76e650de4c003e04 Mon Sep 17 00:00:00 2001 From: joegoldman2 <147369450+joegoldman2@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:27:24 +0000 Subject: [PATCH 1/4] Update MetadataStatement to include friendly names --- Src/Fido2.Models/Metadata/MetadataStatement.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Src/Fido2.Models/Metadata/MetadataStatement.cs b/Src/Fido2.Models/Metadata/MetadataStatement.cs index af7dc054..b62862d6 100644 --- a/Src/Fido2.Models/Metadata/MetadataStatement.cs +++ b/Src/Fido2.Models/Metadata/MetadataStatement.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Fido2NetLib; @@ -7,7 +7,7 @@ namespace Fido2NetLib; /// Represents the metadata statement. /// /// -/// +/// /// public class MetadataStatement { @@ -48,6 +48,12 @@ public class MetadataStatement [JsonPropertyName("description"), Required] public string Description { get; set; } + /// + /// Gets or sets a human-readable, short description of the authenticator, in alternative languages. + /// + [JsonPropertyName("friendlyNames")] + public IDictionary FriendlyNames { get; set; } + /// /// Gets or set a list of human-readable short descriptions of the authenticator in different languages. /// From 167360aa0ce6c890bad1d80a6aba396036102850 Mon Sep 17 00:00:00 2001 From: joegoldman2 <147369450+joegoldman@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:18:34 +0000 Subject: [PATCH 2/4] Fix file encoding --- Src/Fido2.Models/Metadata/MetadataStatement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Fido2.Models/Metadata/MetadataStatement.cs b/Src/Fido2.Models/Metadata/MetadataStatement.cs index b62862d6..b7097d25 100644 --- a/Src/Fido2.Models/Metadata/MetadataStatement.cs +++ b/Src/Fido2.Models/Metadata/MetadataStatement.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Fido2NetLib; From 5ac0f2ab57de40007221ae0aafda7f8331b24620 Mon Sep 17 00:00:00 2001 From: joegoldman2 <147369450+joegoldman2@users.noreply.github.com> Date: Mon, 16 Sep 2024 06:08:10 +0000 Subject: [PATCH 3/4] Update MetadataStatement.cs --- Src/Fido2.Models/Metadata/MetadataStatement.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/Fido2.Models/Metadata/MetadataStatement.cs b/Src/Fido2.Models/Metadata/MetadataStatement.cs index b7097d25..cdc8aca8 100644 --- a/Src/Fido2.Models/Metadata/MetadataStatement.cs +++ b/Src/Fido2.Models/Metadata/MetadataStatement.cs @@ -51,6 +51,7 @@ public class MetadataStatement /// /// Gets or sets a human-readable, short description of the authenticator, in alternative languages. /// + /// A dictionary where keys are IETF language codes (e.g. "de-AT" for Austrian-German) and values are human-readable descriptions. [JsonPropertyName("friendlyNames")] public IDictionary FriendlyNames { get; set; } From 7c0fd5c2caf757869365111ba29b6be755513675 Mon Sep 17 00:00:00 2001 From: joegoldman2 <147369450+joegoldman@users.noreply.github.com> Date: Mon, 16 Sep 2024 07:58:23 +0000 Subject: [PATCH 4/4] Fix alternativeDescriptions --- .../Metadata/AlternativeDescriptions.cs | 27 ------------------- .../Metadata/AuthenticatorStatus.cs | 2 +- .../Metadata/BiometricStatusReport.cs | 2 +- .../Metadata/MetadataStatement.cs | 3 ++- Src/Fido2.Models/Metadata/StatusReport.cs | 2 +- 5 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 Src/Fido2.Models/Metadata/AlternativeDescriptions.cs diff --git a/Src/Fido2.Models/Metadata/AlternativeDescriptions.cs b/Src/Fido2.Models/Metadata/AlternativeDescriptions.cs deleted file mode 100644 index 530c2bca..00000000 --- a/Src/Fido2.Models/Metadata/AlternativeDescriptions.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Text.Json.Serialization; - -namespace Fido2NetLib; - -/// -/// This descriptor contains description in alternative languages. -/// -/// -/// -/// -public class AlternativeDescriptions -{ - /// - /// Gets or sets alternative descriptions of the authenticator. - /// - /// Contains IETF language codes as key (e.g. "ru-RU", "de", "fr-FR") and a localized description as value. - /// - /// - /// - /// Contains IETF language codes, defined by a primary language subtag, - /// followed by a region subtag based on a two-letter country code from [ISO3166] alpha-2 (usually written in upper case). - /// Each description SHALL NOT exceed a maximum length of 200 characters. - /// Description values can contain any UTF-8 characters. - /// - [JsonPropertyName("alternativeDescriptions")] - public Dictionary IETFLanguageCodesMembers { get; set; } -} diff --git a/Src/Fido2.Models/Metadata/AuthenticatorStatus.cs b/Src/Fido2.Models/Metadata/AuthenticatorStatus.cs index 54d0e46b..304d2ce8 100644 --- a/Src/Fido2.Models/Metadata/AuthenticatorStatus.cs +++ b/Src/Fido2.Models/Metadata/AuthenticatorStatus.cs @@ -6,7 +6,7 @@ namespace Fido2NetLib; /// Describes the status of an authenticator model as identified by its AAID and potentially some additional information (such as a specific attestation key). /// /// -/// +/// /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum AuthenticatorStatus diff --git a/Src/Fido2.Models/Metadata/BiometricStatusReport.cs b/Src/Fido2.Models/Metadata/BiometricStatusReport.cs index 669983a4..d557b9c3 100644 --- a/Src/Fido2.Models/Metadata/BiometricStatusReport.cs +++ b/Src/Fido2.Models/Metadata/BiometricStatusReport.cs @@ -7,7 +7,7 @@ namespace Fido2NetLib; /// Contains the current BiometricStatusReport of one of the authenticator's biometric component. /// /// -/// +/// /// public class BiometricStatusReport { diff --git a/Src/Fido2.Models/Metadata/MetadataStatement.cs b/Src/Fido2.Models/Metadata/MetadataStatement.cs index cdc8aca8..e838136a 100644 --- a/Src/Fido2.Models/Metadata/MetadataStatement.cs +++ b/Src/Fido2.Models/Metadata/MetadataStatement.cs @@ -58,8 +58,9 @@ public class MetadataStatement /// /// Gets or set a list of human-readable short descriptions of the authenticator in different languages. /// + /// A dictionary where keys are IETF language codes (e.g. "de-AT" for Austrian-German) and values are human-readable descriptions. [JsonPropertyName("alternativeDescriptions")] - public AlternativeDescriptions IETFLanguageCodesMembers { get; set; } + public IDictionary AlternativeDescriptions { get; set; } /// /// Gets or set earliest (i.e. lowest) trustworthy authenticatorVersion meeting the requirements specified in this metadata statement. diff --git a/Src/Fido2.Models/Metadata/StatusReport.cs b/Src/Fido2.Models/Metadata/StatusReport.cs index 7ddcad5d..f2b860d9 100644 --- a/Src/Fido2.Models/Metadata/StatusReport.cs +++ b/Src/Fido2.Models/Metadata/StatusReport.cs @@ -7,7 +7,7 @@ namespace Fido2NetLib; /// Contains an AuthenticatorStatus and additional data associated with it, if any. /// /// -/// +/// /// public sealed class StatusReport {