You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The data in U2FDeviceInfo is specific to the HID transport, and it's somewhat awkward to include it in virtual devices.
Apart from checking for the CBOR capability in FidoDevice::init (which is probably not necessary), we only use get_device_info in status updates. Firefox doesn't do anything with these status updates, so I don't see any reason to keep them.
At least in the current draft of the about-page, I am relying on the DeviceAvailable/Unavailable messages (e.g. to determine when resetting a device, if all have been removed and only the one we want to reset has been re-inserted).
It is not using the dev-info, however (yet). If #217 would land, then we could use that to display the names of the token and the manufacturer, too (not strictly needed, but nice to have).
So I feel hesitant to remove it all, although I do agree that its a bit awkward in general and could use some refactoring.
Your use of DeviceAvailable and DeviceUnavailable on the about page doesn't require a U2FDeviceInfo, so I would at least want to simplify the status updates. But I'd suggest that, rather than counting DeviceAdded and DeviceUnavailable messages, you add a StatusUpdate::ResetError(...) that tells the application what needs to be done to perform a reset.
To your second point, we could include a human-readable debug_info: String with StatusUpdate::InteractiveManagement and let each device type define what goes in it.
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
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.
(This is conceptually part of #270, but I separated it out since it has side effects.)
The abstract FidoDevice trait depends on
U2FDeviceInfothroughThe data in
U2FDeviceInfois specific to the HID transport, and it's somewhat awkward to include it in virtual devices.Apart from checking for the CBOR capability in
FidoDevice::init(which is probably not necessary), we only useget_device_infoin status updates. Firefox doesn't do anything with these status updates, so I don't see any reason to keep them.