pub struct WebCredential {
pub id: String,
pub principal_id: String,
pub label: String,
pub public_key_hex: String,
pub sign_count: u32,
pub created: UnixMillis,
pub last_used: Option<UnixMillis>,
pub sessions: Vec<String>,
}Expand description
A web credential — a person’s WebAuthn passkey (Stage L, 2026-10-04).
A row in the identity table beside the person’s SSH keys, so it lives and
dies with the principal, rides the same compare-and-swap, and reaches the
twin with the rest of refs/gunnar/auth. gunnar verifies a login’s
assertion against public_key_hex itself: the console relays the browser’s
answer and holds no credential of its own.
Fields§
§id: StringThe authenticator’s raw credential id, base64url without padding — the map key, and what a login names.
principal_id: StringThe principal it logs in as. Only a USER may hold one.
label: StringWhat the person called it.
public_key_hex: StringThe P-256 public key, SEC1 uncompressed (04 || X || Y), lowercase hex.
sign_count: u32The authenticator’s signature counter as of the last accepted login.
created: UnixMillisWhen it was registered.
last_used: Option<UnixMillis>When it last logged in, if ever.
sessions: Vec<String>The session keys its logins enrolled (fingerprints), so revoking the passkey ends the sessions it opened. Pruned at each login to the keys still held and unexpired.