• Martin Kreichgauer's avatar
    webauth: move isUVPAA() implementation out of the //chrome layer · 263f6d8d
    Martin Kreichgauer authored
    The IsUserVerifyingPlatformAuthenticator() WebAuthn API call needlessly
    required the content embedder to provide their own implementation in an
    AuthenticatorRequestClientDelegate specialization. This change moves the
    ChromeAuthenticatorRequestDelegate implementation into the content layer
    (AuthenticatorCommon). The implementation is general enough to be useful
    for other embedders and it doesn't depend on any state internal to the
    delegate.
    
    Concretly, IsUVPAA()
    - on Windows returns the corresponding value from the native WebAuthn
    API;
    - on macOS reflects TouchIdAuthenticator availability as long as the
    embedder provides an implementation of GetTouchIdAuthenticatorConfig.
    
    Also collapse methods in AuthenticatorCommon that determine which
    transports to instantiate discoveries for, and also add a safeguard
    against instantiating platform discoveries in contexts where IsUVPAA()
    returns false.
    
    Change-Id: I8eb68ca6f8cd17fae61d9d0294b872ef0cfb3465
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083936
    Commit-Queue: Martin Kreichgauer <martinkr@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarAdam Langley <agl@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#748544}
    263f6d8d
virtual_authenticator_request_delegate.h 1.45 KB