Class WebAuthnCredential

Assembly: redb.Identity.Core.dll

WebAuthn (FIDO2) credential descriptor stored per user in .
One row per registered authenticator (Yubikey, TouchID, sync-passkey, …); multiple rows per
user are normal and required (passkey-providers register one credential per device-cluster).

All cryptographic verification is delegated to Fido2NetLib (Fido2.MakeAssertionAsync) —
this DTO is just the persisted shape. Equality of is the credential's
primary key; the COSE-encoded never changes, but
does (see field doc) and is updated atomically with each successful
assertion under LockForUpdateAsync so concurrent assertions cannot lose the counter
advance (CTAP2 spec — counter rollback is treated as cloning evidence).

public sealed class WebAuthnCredential

Inheritance

Object→WebAuthnCredential

Properties

Aaguid

Authenticator AAGUID (FIDO2 attestation metadata; 16-byte GUID, base64url-encoded here).

public string? Aaguid { get; set; }

BackupEligible

FIDO2 backup-eligibility flag from the authenticator data (BE bit, byte[0] bit 3).

public bool BackupEligible { get; set; }

BackupState

FIDO2 current backup-state flag from the authenticator data (BS bit, byte[0] bit 4).

public bool BackupState { get; set; }

CredentialId

Raw credential ID bytes. Base64url-encoded by callers when used as a dictionary key.

public byte[] CredentialId { get; set; }

DisplayName

User-friendly device label (e.g. "YubiKey 5 NFC", "iPhone Touch ID").

public string? DisplayName { get; set; }

LastUsedAt

Last successful assertion timestamp.

public DateTimeOffset? LastUsedAt { get; set; }

PublicKey

COSE-encoded public key bytes. Immutable for the lifetime of the credential.

public byte[] PublicKey { get; set; }

RegisteredAt

When the credential was registered.

public DateTimeOffset RegisteredAt { get; set; }

SignCount

Authenticator-reported signature counter. Per CTAP2 §6.1.4 it MUST be monotonically

public long SignCount { get; set; }

UserVerified

Whether user-verification (PIN / biometric) was asserted at registration time

public bool UserVerified { get; set; }