Commit 9bb00ca2 authored by Suzy Li's avatar Suzy Li Committed by Commit Bot

Add isUVPAA interface for implementation on clank

isUVPAA is currently implemented in AuthenticatorImpl.java by using
fingerprintManager. GmsCore SDK v26 now provides its own
implementation of isUVPAA as part of the FIDO2 APIs, so Clank should
call that API instead.

This CL is the initial change to support the implementation on clank.
It adds isUVPAA interface and callback, but does not actually use the
isUVPAA in Gmscore. Once the implementation on clank landed, will add
a follow up change to use it.

Bug: 976480
Change-Id: Idc939f798720b413e5f62c7269f9771fad7f9111
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1671707Reviewed-by: default avatarKim Paulhamus <kpaulhamus@chromium.org>
Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: Suzy Li <suzyli@google.com>
Cr-Commit-Position: refs/heads/master@{#671734}
parent 29f81103
...@@ -40,6 +40,8 @@ public class AuthenticatorImpl implements Authenticator, HandlerResponseCallback ...@@ -40,6 +40,8 @@ public class AuthenticatorImpl implements Authenticator, HandlerResponseCallback
.Callback2<Integer, MakeCredentialAuthenticatorResponse> mMakeCredentialCallback; .Callback2<Integer, MakeCredentialAuthenticatorResponse> mMakeCredentialCallback;
private org.chromium.mojo.bindings.Callbacks private org.chromium.mojo.bindings.Callbacks
.Callback2<Integer, GetAssertionAuthenticatorResponse> mGetAssertionCallback; .Callback2<Integer, GetAssertionAuthenticatorResponse> mGetAssertionCallback;
private org.chromium.mojo.bindings.Callbacks
.Callback1<Boolean> mIsUserVerifyingPlatformAuthenticatorAvailableCallback;
/** /**
* Builds the Authenticator service implementation. * Builds the Authenticator service implementation.
...@@ -139,6 +141,13 @@ public class AuthenticatorImpl implements Authenticator, HandlerResponseCallback ...@@ -139,6 +141,13 @@ public class AuthenticatorImpl implements Authenticator, HandlerResponseCallback
close(); close();
} }
@Override
public void onIsUserVerifyingPlatformAuthenticatorAvailableResponse(boolean isUVPAA) {
assert mIsUserVerifyingPlatformAuthenticatorAvailableCallback != null;
mIsUserVerifyingPlatformAuthenticatorAvailableCallback.call(isUVPAA);
close();
}
@Override @Override
public void onError(Integer status) { public void onError(Integer status) {
assert((mMakeCredentialCallback != null && mGetAssertionCallback == null) assert((mMakeCredentialCallback != null && mGetAssertionCallback == null)
......
...@@ -50,4 +50,7 @@ public class Fido2ApiHandler { ...@@ -50,4 +50,7 @@ public class Fido2ApiHandler {
protected void getAssertion(PublicKeyCredentialRequestOptions options, protected void getAssertion(PublicKeyCredentialRequestOptions options,
RenderFrameHost frameHost, HandlerResponseCallback callback) {} RenderFrameHost frameHost, HandlerResponseCallback callback) {}
protected void isUserVerifyingPlatformAuthenticatorAvailable(
RenderFrameHost frameHost, HandlerResponseCallback callback) {}
} }
...@@ -23,6 +23,12 @@ public interface HandlerResponseCallback { ...@@ -23,6 +23,12 @@ public interface HandlerResponseCallback {
*/ */
void onSignResponse(Integer status, GetAssertionAuthenticatorResponse response); void onSignResponse(Integer status, GetAssertionAuthenticatorResponse response);
/**
* Interface that returns the response from a request to call
* isUserVerifyingPlatformAuthenticatorAvailable.
*/
void onIsUserVerifyingPlatformAuthenticatorAvailableResponse(boolean isUVPAA);
/** /**
* Interface that returns any errors from either register or sign requests. * Interface that returns any errors from either register or sign requests.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment