Skip to content

common: rename Credential.username to display_name - #255

Open
kpanuragh wants to merge 1 commit into
linux-credentials:mainfrom
kpanuragh:credential-display-name
Open

kpanuragh wants to merge 1 commit into
linux-credentials:mainfrom
kpanuragh:credential-display-name

Conversation

@kpanuragh

Copy link
Copy Markdown

Credential.username was filled from WebAuthn's user.displayName, while name holds user.name, so the field name pointed at the wrong value. This renames it to display_name to match WebAuthn and documents both fields.

  • common: Credential.username -> display_name
  • daemon: fill display_name in the USB and NFC credential lists
  • ui: rename the CredentialObject property; the label text is unchanged (name (display name))
  • doc/api.md: describe both fields with their WebAuthn sources, drop the TODO, add a revision-history entry
  • CHANGELOG: breaking change for the UI Controller API, since the dict key sent with SelectingCredential changes

Tests: a check that Credential serializes with the name/display_name dict keys, and round-trip tests for the GTK CredentialObject (the property name is only checked at runtime). meson test 5/5.

This issue was claimed in Aug 2025 with no PR since; I asked on the issue first. Happy to close this if that work is still going on.

Closes #79

The field was filled from WebAuthn's user.displayName while the
neighbouring name field holds user.name, so "username" pointed at the
wrong value. Use the WebAuthn name instead and document both fields.

This changes the dict key sent with SelectingCredential, so it is listed
as a breaking change of the UI Controller API.

Refs linux-credentials#79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename Credential struct fields

1 participant