mirror of
https://github.com/MichaelGrafnetter/webauthn-interop
synced 2026-08-09 12:12:33 +00:00
Additional constants
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
using DSInternals.Win32.WebAuthn.Interop;
|
||||
using Windows.Win32;
|
||||
|
||||
namespace DSInternals.Win32.WebAuthn
|
||||
@@ -23,21 +24,21 @@ namespace DSInternals.Win32.WebAuthn
|
||||
/// Universal Serial Bus (USB).
|
||||
/// </summary>
|
||||
/// <remarks>Corresponds to WEBAUTHN_CTAP_TRANSPORT_USB.</remarks>
|
||||
[EnumMember(Value = "usb")]
|
||||
[EnumMember(Value = ApiConstants.CtapTransportUsb)]
|
||||
USB = PInvoke.WEBAUTHN_CTAP_TRANSPORT_USB,
|
||||
|
||||
/// <summary>
|
||||
/// Near Field Communication (NFC).
|
||||
/// </summary>
|
||||
/// <remarks>Corresponds to WEBAUTHN_CTAP_TRANSPORT_NFC.</remarks>
|
||||
[EnumMember(Value = "nfc")]
|
||||
[EnumMember(Value = ApiConstants.CtapTransportNfc)]
|
||||
NFC = PInvoke.WEBAUTHN_CTAP_TRANSPORT_NFC,
|
||||
|
||||
/// <summary>
|
||||
/// Bluetooth Low Energy (BLE).
|
||||
/// </summary>
|
||||
/// <remarks>Corresponds to WEBAUTHN_CTAP_TRANSPORT_BLE.</remarks>
|
||||
[EnumMember(Value = "ble")]
|
||||
[EnumMember(Value = ApiConstants.CtapTransportBle)]
|
||||
BLE = PInvoke.WEBAUTHN_CTAP_TRANSPORT_BLE,
|
||||
|
||||
/// <summary>
|
||||
@@ -50,21 +51,21 @@ namespace DSInternals.Win32.WebAuthn
|
||||
/// Client device-specific transport (platform authenticator).
|
||||
/// </summary>
|
||||
/// <remarks>Corresponds to WEBAUTHN_CTAP_TRANSPORT_INTERNAL.</remarks>
|
||||
[EnumMember(Value = "internal")]
|
||||
[EnumMember(Value = ApiConstants.CtapTransportInternal)]
|
||||
Internal = PInvoke.WEBAUTHN_CTAP_TRANSPORT_INTERNAL,
|
||||
|
||||
/// <summary>
|
||||
/// Hybrid Transport (QR Code / caBLE).
|
||||
/// </summary>
|
||||
/// <remarks>Corresponds to WEBAUTHN_CTAP_TRANSPORT_HYBRID.</remarks>
|
||||
[EnumMember(Value = "hybrid")]
|
||||
[EnumMember(Value = ApiConstants.CtapTransportHybrid)]
|
||||
Hybrid = PInvoke.WEBAUTHN_CTAP_TRANSPORT_HYBRID,
|
||||
|
||||
/// <summary>
|
||||
/// Smart card transport.
|
||||
/// </summary>
|
||||
/// <remarks>Corresponds to WEBAUTHN_CTAP_TRANSPORT_SMART_CARD.</remarks>
|
||||
[EnumMember(Value = "smart-card")]
|
||||
[EnumMember(Value = ApiConstants.CtapTransportSmartCard)]
|
||||
SmartCard = PInvoke.WEBAUTHN_CTAP_TRANSPORT_SMART_CARD
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
using DSInternals.Win32.WebAuthn.Interop;
|
||||
|
||||
namespace DSInternals.Win32.WebAuthn;
|
||||
|
||||
@@ -21,18 +22,18 @@ public enum PublicKeyCredentialHint
|
||||
/// <summary>
|
||||
/// Indicates that the Relying Party believes that users will satisfy this request with a physical security key.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "security-key")]
|
||||
[EnumMember(Value = ApiConstants.CredentialHintSecurityKey)]
|
||||
SecurityKey,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that the Relying Party believes that users will satisfy this request with a platform authenticator built into the client device.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "client-device")]
|
||||
[EnumMember(Value = ApiConstants.CredentialHintClientDevice)]
|
||||
ClientDevice,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that the Relying Party believes that users will satisfy this request with a general-purpose authenticator such as smartphone (hybrid transport).
|
||||
/// </summary>
|
||||
[EnumMember(Value = "hybrid")]
|
||||
[EnumMember(Value = ApiConstants.CredentialHintHybrid)]
|
||||
Hybrid
|
||||
}
|
||||
|
||||
@@ -81,5 +81,75 @@ namespace DSInternals.Win32.WebAuthn.Interop
|
||||
/// Corresponds to WEBAUTHN_EXTENSIONS_IDENTIFIER_HMAC_SECRET.
|
||||
/// </remarks>
|
||||
public const string ExtensionIdentifierHmacSecret = PInvoke.WEBAUTHN_EXTENSIONS_IDENTIFIER_HMAC_SECRET;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_ATTESTATION_TYPE_PACKED.
|
||||
/// </remarks>
|
||||
public const string AttestationTypePacked = PInvoke.WEBAUTHN_ATTESTATION_TYPE_PACKED;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_ATTESTATION_TYPE_U2F.
|
||||
/// </remarks>
|
||||
public const string AttestationTypeU2F = PInvoke.WEBAUTHN_ATTESTATION_TYPE_U2F;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_ATTESTATION_TYPE_TPM.
|
||||
/// </remarks>
|
||||
public const string AttestationTypeTpm = PInvoke.WEBAUTHN_ATTESTATION_TYPE_TPM;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_ATTESTATION_TYPE_NONE.
|
||||
/// </remarks>
|
||||
public const string AttestationTypeNone = PInvoke.WEBAUTHN_ATTESTATION_TYPE_NONE;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_ATTESTATION_VER_TPM_2_0.
|
||||
/// </remarks>
|
||||
public const string AttestationVersionTpm20 = PInvoke.WEBAUTHN_ATTESTATION_VER_TPM_2_0;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_CTAP_TRANSPORT_USB_STRING.
|
||||
/// </remarks>
|
||||
public const string CtapTransportUsb = PInvoke.WEBAUTHN_CTAP_TRANSPORT_USB_STRING;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_CTAP_TRANSPORT_NFC_STRING.
|
||||
/// </remarks>
|
||||
public const string CtapTransportNfc = PInvoke.WEBAUTHN_CTAP_TRANSPORT_NFC_STRING;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_CTAP_TRANSPORT_BLE_STRING.
|
||||
/// </remarks>
|
||||
public const string CtapTransportBle = PInvoke.WEBAUTHN_CTAP_TRANSPORT_BLE_STRING;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_CTAP_TRANSPORT_INTERNAL_STRING.
|
||||
/// </remarks>
|
||||
public const string CtapTransportInternal = PInvoke.WEBAUTHN_CTAP_TRANSPORT_INTERNAL_STRING;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_CTAP_TRANSPORT_HYBRID_STRING.
|
||||
/// </remarks>
|
||||
public const string CtapTransportHybrid = PInvoke.WEBAUTHN_CTAP_TRANSPORT_HYBRID_STRING;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_CTAP_TRANSPORT_SMART_CARD_STRING.
|
||||
/// </remarks>
|
||||
public const string CtapTransportSmartCard = PInvoke.WEBAUTHN_CTAP_TRANSPORT_SMART_CARD_STRING;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_CREDENTIAL_HINT_SECURITY_KEY.
|
||||
/// </remarks>
|
||||
public const string CredentialHintSecurityKey = PInvoke.WEBAUTHN_CREDENTIAL_HINT_SECURITY_KEY;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_CREDENTIAL_HINT_CLIENT_DEVICE.
|
||||
/// </remarks>
|
||||
public const string CredentialHintClientDevice = PInvoke.WEBAUTHN_CREDENTIAL_HINT_CLIENT_DEVICE;
|
||||
|
||||
/// <remarks>
|
||||
/// Corresponds to WEBAUTHN_CREDENTIAL_HINT_HYBRID.
|
||||
/// </remarks>
|
||||
public const string CredentialHintHybrid = PInvoke.WEBAUTHN_CREDENTIAL_HINT_HYBRID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@ WEBAUTHN_CTAP_TRANSPORT_*
|
||||
WEBAUTHN_CREDENTIAL_EX_CURRENT_VERSION
|
||||
WEBAUTHN_CREDENTIAL_CURRENT_VERSION
|
||||
WEBAUTHN_ENTERPRISE_ATTESTATION_*
|
||||
WEBAUTHN_ATTESTATION_TYPE_*
|
||||
WEBAUTHN_ATTESTATION_VER_*
|
||||
WEBAUTHN_CREDENTIAL_HINT_*
|
||||
WEBAUTHN_RP_ENTITY_INFORMATION_CURRENT_VERSION
|
||||
WEBAUTHN_GET_CREDENTIALS_OPTIONS_VERSION_*
|
||||
WEBAUTHN_GET_CREDENTIALS_OPTIONS_CURRENT_VERSION
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace DSInternals.Win32.WebAuthn
|
||||
writer.WriteStartMap(3);
|
||||
|
||||
writer.WriteTextString("fmt");
|
||||
writer.WriteTextString("packed");
|
||||
writer.WriteTextString(ApiConstants.AttestationTypePacked);
|
||||
|
||||
writer.WriteTextString("authData");
|
||||
writer.WriteByteString(authenticatorData);
|
||||
|
||||
Reference in New Issue
Block a user