Sigra.Passkeys.Credential (Sigra v0.2.3)

Copy Markdown View Source

Library struct representing a WebAuthn passkey credential.

Maps to and from the generated host UserPasskey Ecto schema — the library never references the host schema by module name. Mirrors Sigra.MFA.Credential field-for-field per Phase 19 D-04.

Summary

Types

t()

@type t() :: %Sigra.Passkeys.Credential{
  aaguid: String.t() | nil,
  credential_id: binary() | nil,
  device_hint: String.t() | nil,
  id: term(),
  inserted_at: DateTime.t() | nil,
  last_used_at: DateTime.t() | nil,
  nickname: String.t() | nil,
  public_key: binary() | nil,
  rp_id: String.t() | nil,
  sign_count: non_neg_integer(),
  transports: [String.t()],
  updated_at: DateTime.t() | nil,
  user_id: term()
}

Functions

from_schema(schema)

@spec from_schema(map()) :: t()

to_params(credential)

@spec to_params(t()) :: map()