Repository navigation
Conversation
credentialsd moved the UI backend to a session-based interface in linux-credentials/credentialsd@42dc12f: one CreateSession call per ceremony, Notify methods for state updates, and signals carrying the session handle, with each ceremony represented by an org.freedesktop.impl.portal.Session. Since then it also gained NotifyPinNotSet, SetDevicePin and the Restarting notifications. Update the backend interface to match what credentialsd calls, and document it in the same style as the other backend interfaces, including the requirement that signals are sent unicast to the caller. Assisted-by: Claude:claude-opus-5-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
org.freedesktop.impl.portal.experimental.Credential.xmlstill describes the originalInitialize/Credential.Ceremony/NotifyStateChanged/UserInteracteddesign. credentialsd moved the UI backend to a session-based interface in linux-credentials/credentialsd@42dc12f, and has since addedNotifyPinNotSet,SetDevicePinand the*Restartingnotifications. A backend implemented from this file today can't talk to credentialsd.This updates the interface to match what credentialsd calls (
credentialsd/src/dbus/ui_control.rs):CreateSessioncreates oneorg.freedesktop.impl.portal.Sessionper ceremony atsession_handle.Notify*methods carry state updates, each taking the session handle.DiscoveryRequested,ClientPinEntered,SetDevicePinandCredentialSelectedsignals carry the session handle.It also documents each method and signal in the same style as the other backend interfaces, including behavior that is currently only implied by credentialsd:
Closed, must be sent unicast to the caller. credentialsd's match rules filter on destination, and the PIN signals carry fds.Notify*calls from peers other than the session's creator.Closedis and isn't emitted (user dismissal vs. callerClose(), completion, caller disconnect).typevalues, transports,optionskeys,PinNotSetreasons, credential metadata keys, error codes, and the memfd conventions for PIN and QR data.No C code in this repo uses the impl interface, so only the installed XML and the generated docs change. This doesn't overlap with #1, which touches the handler interface.
Testing:
gdbus-codegen --generate-rstrenders it without warnings, and all internal:ref:targets resolve.Close()and caller disconnect.AI was used while making these changes but all output was review by me.