-
Notifications
You must be signed in to change notification settings - Fork 75
Add a higher-level AuthenticatorService that can query multiple backends #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
That's a lot of wat I was missing for #114, yeah! There seems to be one subtle "gotcha", though: Something to think about is what exactly |
Those are excellent questions that are running through my head, too. Right now I'm sort-of-testing this PR by adding a WebDriver Virtual Device tool, which nearly is wired up (and will hit the cancel issue, so thanks for that!). But after the refactor in #124 it absolutely raises whether Still, glad that I'm heading the direction you were imagining, too. I'll get my |
329b4d5
to
f9abd16
Compare
https://github.com/mozilla/authenticator-rs/tree/virtual_devices doesn't have the cancel fix, but it sort of starts the sketch of how non-HID devices might interact with |
b4bd7bd
to
518e0dd
Compare
OK, cancel fix is in here. I'm going to eventually split this into more logical PRs rather than this monoith I let this become, but I want to make sure if the direction before I ask for more review, and I don't see a reason to split until I'm ready for review. |
- This moves the callback mechanism into its own file, as it gets more complex - Reworks the C API to use the AuthenticatorService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
Major changes: * Move to Rust 2018 edition #125 * Remove dependency on boxfnonce #121 * Reworked error handling #130 * Added a higher-level AuthenticatorService that can use multiple backends #123 * Changed the C API to use the new AuthenticatorService #123 * Added a Status channel for backends #122 * Now obtaining HID report sizes from the descriptors #112 * Add authenticator USB and Firmware details to the C API #93
This patch adds a new trait
AuthenticatorTransport
for the existingmanager.rs
'sU2FManager
to implement, and a higher-levelAuthenticatorService
that registersAuthenticatorTransport
s and queries them.This starts down the road of adding in additional authenticator/transport implementations to be queried simultaneously, including reworking the callback function to have an observer which cancels other transports (see
clone_and_configure_cancellation_callback
inauthenticatorservice.rs
). It does not add any new transport types, which will be done in their own PRs.