|
| 1 | +using System.Runtime.Serialization; |
| 2 | +using System.Text.Json.Serialization; |
| 3 | + |
| 4 | +namespace Fido2NetLib.Objects; |
| 5 | + |
| 6 | +/// <summary> |
| 7 | +/// The attestation statement format identifier in WebAuthn specifies the format of the attestation statement that is used to attest to the authenticity of a credential created by a WebAuthn authenticator. |
| 8 | +/// https://www.iana.org/assignments/webauthn/webauthn.xhtml |
| 9 | +/// </summary> |
| 10 | +[JsonConverter(typeof(FidoEnumConverter<AttestationStatementFormatIdentifier>))] |
| 11 | +public enum AttestationStatementFormatIdentifier |
| 12 | +{ |
| 13 | + /// <summary> |
| 14 | + /// The "packed" attestation statement format is a WebAuthn-optimized format for attestation. It uses a very compact but still extensible encoding method. This format is implementable by authenticators with limited resources (e.g., secure elements). |
| 15 | + /// </summary> |
| 16 | + [EnumMember(Value = "packed")] |
| 17 | + Packed, |
| 18 | + |
| 19 | + /// <summary> |
| 20 | + /// The "TPM" attestation statement format returns an attestation statement in the same format as the packed attestation statement format, although the rawData and signature fields are computed differently. |
| 21 | + /// </summary> |
| 22 | + [EnumMember(Value = "tpm")] |
| 23 | + Tpm, |
| 24 | + |
| 25 | + /// <summary> |
| 26 | + /// Platform authenticators on versions "N", and later, may provide this proprietary "hardware attestation" statement. |
| 27 | + /// </summary> |
| 28 | + [EnumMember(Value = "android-key")] |
| 29 | + AndroidKey, |
| 30 | + |
| 31 | + /// <summary> |
| 32 | + /// Android-based platform authenticators MAY produce an attestation statement based on the Android SafetyNet API. |
| 33 | + /// </summary> |
| 34 | + [EnumMember(Value = "android-safetynet")] |
| 35 | + AndroidSafetyNet, |
| 36 | + |
| 37 | + /// <summary> |
| 38 | + /// Used with FIDO U2F authenticators. |
| 39 | + /// </summary> |
| 40 | + [EnumMember(Value = "fido-u2f")] |
| 41 | + FidoU2f, |
| 42 | + |
| 43 | + /// <summary> |
| 44 | + /// Used with Apple devices' platform authenticators. |
| 45 | + /// </summary> |
| 46 | + [EnumMember(Value = "apple")] |
| 47 | + Apple, |
| 48 | + |
| 49 | + /// <summary> |
| 50 | + /// Used to replace any authenticator-provided attestation statement when a WebAuthn Relying Party indicates it does not wish to receive attestation information. |
| 51 | + /// </summary> |
| 52 | + [EnumMember(Value = "none")] |
| 53 | + None |
| 54 | +} |
| 55 | + |
0 commit comments