Skip to content

Latest commit

 

History

History
174 lines (104 loc) · 5.29 KB

File metadata and controls

174 lines (104 loc) · 5.29 KB

Class CredentialExchangeFile

Namespace: DSInternals.Win32.WebAuthn.Cryptography
Assembly: DSInternals.Win32.WebAuthn.dll

Represents the top-level Header of a FIDO Credential Exchange Format (CXF) payload.

public sealed class CredentialExchangeFile

Inheritance

objectCredentialExchangeFile

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Remarks

Implements the cleartext data model defined in FIDO Credential Exchange Format v1.0.

Fields

PasskeyCredentialType

The CXF credential type discriminator value used for passkeys.

public const string PasskeyCredentialType = "passkey"

Field Value

string

Properties

Accounts

The list of accounts contained in the export.

[JsonPropertyName("accounts")]
public CredentialExchangeAccount[]? Accounts { get; set; }

Property Value

CredentialExchangeAccount[]?

ExporterDisplayName

The display name of the exporting credential provider.

[JsonPropertyName("exporterDisplayName")]
public string? ExporterDisplayName { get; set; }

Property Value

string?

ExporterRelyingPartyId

The relying party identifier of the exporting credential provider.

[JsonPropertyName("exporterRpId")]
public string? ExporterRelyingPartyId { get; set; }

Property Value

string?

Timestamp

The Unix timestamp at which the export was generated, in seconds.

[JsonPropertyName("timestamp")]
public ulong Timestamp { get; set; }

Property Value

ulong

Version

The version of the CXF payload.

[JsonPropertyName("version")]
public CredentialExchangeVersion? Version { get; set; }

Property Value

CredentialExchangeVersion?

Methods

GetPasskeys(Guid?)

Returns all passkeys contained in this CXF payload.

public IReadOnlyList<ExportedPasskey> GetPasskeys(Guid? aaGuid = null)

Parameters

aaGuid Guid?

Optional AAGUID to assign to the imported passkeys. Defaults to as CXF does not carry an AAGUID.

Returns

IReadOnlyList<ExportedPasskey>

The passkeys contained in the export.

LoadFromFile(string)

Loads and parses a CXF JSON document from disk.

public static CredentialExchangeFile LoadFromFile(string filePath)

Parameters

filePath string

Path to the CXF JSON file.

Returns

CredentialExchangeFile

The parsed CXF payload.

LoadFromJson(string)

Parses a CXF JSON document.

public static CredentialExchangeFile LoadFromJson(string json)

Parameters

json string

The CXF JSON content.

Returns

CredentialExchangeFile

The parsed CXF payload.