using System.Text.Json.Serialization; using ProtonVPN.OperatingSystems.WebAuthn.Serialization; namespace ProtonVPN.OperatingSystems.WebAuthn; /// /// Information about a user rntity. /// /// Corresponds to WEBAUTHN_USER_ENTITY_INFORMATION. /// https://www.w3.org/TR/webauthn-2/#dictdef-publickeycredentialuserentity public sealed class UserInformation { /// /// Identifier for the user. /// [JsonPropertyName("id")] [JsonConverter(typeof(Base64UrlConverter))] public byte[] Id { get; set; } /// /// Contains a detailed name for this account, such as "john.p.smith@example.com". /// [JsonPropertyName("name")] public string Name { get; set; } /// /// Optional URL that can be used to retrieve an image containing the user's current avatar, or a data URI that contains the image data. /// [JsonPropertyName("icon")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Icon { get; set; } /// /// Contains the friendly name associated with the user account by the Relying Party, such as "John P. Smith". /// [JsonPropertyName("displayName")] public string DisplayName { get; set; } }