-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
webauthn: couple caBLE discoveries with an EventStream.
When PaaSK for 2nd-factor is launched, we don't want to ping phones automatically because we'll be getting linking information from Sync and that would be surprising (and annoying) to users. So we only want to kick off a caBLEv2 transaction when the user selects a phone from the transport-selection dialog. That begs the question of how to plumb that click into the cablev2::Discovery. There are calls from the UI to the FidoRequestHandlerBase (such as |StartAuthenticatorRequest|) but it seems awkward that the request handler should have to know about a discovery-specific concept and should have to enumerate its discoveries to try and find the one to forward it onto. Rather we would like to be able to configure this on the FidoDiscoveryFactory like all the other caBLE data. But the cablev2::Discovery itself hasn't been created at that point, so we can't get a callback on it. What we need is a “late-binding” callback. Like Mojo's PendingRemote, but much (much) lighter. This change adds |EventSource| to do that. It also solves a smaller problem: the V1 discovery holders a pointer to the V2 discovery so that it can forward BLE adverts. This is fine because we know that they'll be destroyed together, but it's slightly bothersome. With an |EventSource| in hand we can do something less coupled. BUG=1002262 Change-Id: I93708ab7803b5f073c9bb5db49a51139d6ab61c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2792062 Commit-Queue: Adam Langley <agl@chromium.org> Reviewed-by: Martin Kreichgauer <martinkr@google.com> Cr-Commit-Position: refs/heads/master@{#867900}
- Loading branch information
Adam Langley
authored and
Chromium LUCI CQ
committed
Mar 31, 2021
1 parent
16ca90f
commit bd60444
Showing
11 changed files
with
121 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.