-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supporting attestation formats (#530)
* Attestation Formats * Add remark * Field should be property. * Collection expression * Remove formats from assertionOptions Assertion time attestation is removed from per this PR: https://github.com/w3c/webauthn/pull/1997/files --------- Co-authored-by: Anders Åberg <[email protected]>
- Loading branch information
1 parent
e687bc6
commit 0d38438
Showing
3 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
Src/Fido2.Models/Objects/AttestationStatementFormatIdentifier.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Fido2NetLib.Objects; | ||
|
||
/// <summary> | ||
/// 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. | ||
/// https://www.iana.org/assignments/webauthn/webauthn.xhtml | ||
/// </summary> | ||
[JsonConverter(typeof(FidoEnumConverter<AttestationStatementFormatIdentifier>))] | ||
public enum AttestationStatementFormatIdentifier | ||
{ | ||
/// <summary> | ||
/// 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). | ||
/// </summary> | ||
[EnumMember(Value = "packed")] | ||
Packed, | ||
|
||
/// <summary> | ||
/// 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. | ||
/// </summary> | ||
[EnumMember(Value = "tpm")] | ||
Tpm, | ||
|
||
/// <summary> | ||
/// Platform authenticators on versions "N", and later, may provide this proprietary "hardware attestation" statement. | ||
/// </summary> | ||
[EnumMember(Value = "android-key")] | ||
AndroidKey, | ||
|
||
/// <summary> | ||
/// Android-based platform authenticators MAY produce an attestation statement based on the Android SafetyNet API. | ||
/// </summary> | ||
[EnumMember(Value = "android-safetynet")] | ||
AndroidSafetyNet, | ||
|
||
/// <summary> | ||
/// Used with FIDO U2F authenticators. | ||
/// </summary> | ||
[EnumMember(Value = "fido-u2f")] | ||
FidoU2f, | ||
|
||
/// <summary> | ||
/// Used with Apple devices' platform authenticators. | ||
/// </summary> | ||
[EnumMember(Value = "apple")] | ||
Apple, | ||
|
||
/// <summary> | ||
/// Used to replace any authenticator-provided attestation statement when a WebAuthn Relying Party indicates it does not wish to receive attestation information. | ||
/// </summary> | ||
[EnumMember(Value = "none")] | ||
None | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters