目录

CLASS info
public interface Fido2Client
Defines FIDO2 APIs.

Constant Summary

TypeNameDesc
intREGISTRATION_REQUESTRegistration request.
intAUTHENTICATION_REQUESTAuthentication request.

Public Method Summary

Return typeMethod name
boolean

isSupported()

Checks whether the FIDO2 capability is available.

void

getRegistrationIntent(Fido2RegistrationRequest request, NativeFido2RegistrationOptions options, Fido2IntentCallback callback)

Obtains Fido2Intent for a app to start registration.

void

getRegistrationIntent(PrivilegedFido2RegistrationRequest request, Fido2IntentCallback callback)

Obtains Fido2Intent for a privileged app to start registration.Currently, this class is available only for HUAWEI Browser. If you want to use this class, apply to Huawei for approval first.

void

getAuthenticationIntent(Fido2AuthenticationRequest request, NativeFido2AuthenticationOptions options, Fido2IntentCallback callback)

Obtains Fido2Intent for a app to start authentication.

void

getAuthenticationIntent(PrivilegedFido2AuthenticationRequest request, Fido2IntentCallback callback);

Obtains Fido2Intent for a privileged app to start authentication.Currently, this class is available only for HUAWEI Browser. If you want to use this class, apply to Huawei for approval first.

Fido2RegistrationResponse

getFido2RegistrationResponse(Intent data)

Obtains the registration result.

Fido2AuthenticationResponse

getFido2AuthenticationResponse(Intent data)

Obtains the authentication result.

Constants

Constant
int REGISTRATION_REQUEST

Parameter requestCode in the launchFido2Activity(Activity activity, int requestCode) method of the Fido2Intent class.Value: 0

Registration request.

Constant
int AUTHENTICATION_REQUEST

Parameter requestCode in the launchFido2Activity(Activity activity, int requestCode) method of the Fido2Intent class.Value: 1

Authentication request.

Public Methods

Method
boolean isSupported()
Checks whether the FIDO2 capability is available.

Return

typedesc
booleanWhether the FIDO2 capability is available.
Method
void getRegistrationIntent(Fido2RegistrationRequest request, NativeFido2RegistrationOptions options, Fido2IntentCallback callback)
Obtains Fido2Intent for a common app to start registration.

Parameters

Parameter nameParameter desc
requestRegistration request.
optionsOptions.
callbackCallback object, which is executed in the main thread.
Method
void getRegistrationIntent(PrivilegedFido2RegistrationRequest request, Fido2IntentCallback callback)
Obtains Fido2Intent for a privileged app to start registration.Currently, this class is available only for HUAWEI Browser. If you want to use this class, apply to Huawei for approval first.

Parameters

Parameter nameParameter desc
requestRegistration request.
callbackCallback object, which is executed in the main thread.
Method
void getAuthenticationIntent(Fido2AuthenticationRequest request, NativeFido2AuthenticationOptions options, Fido2IntentCallback callback)
Obtains Fido2Intent for a common app to start authentication.

Parameters

Parameter nameParameter desc
requestAuthentication request.
optionsOptions.
callbackCallback object, which is executed in the main thread.
Method
void getAuthenticationIntent(PrivilegedFido2AuthenticationRequest request, Fido2IntentCallback callback);
Obtains Fido2Intent for a privileged app to start authentication.Currently, this class is available only for HUAWEI Browser. If you want to use this class, apply to Huawei for approval first.

Parameters

Parameter nameParameter desc
requestAuthentication request.
callbackCallback object, which is executed in the main thread.
Method
Fido2RegistrationResponse getFido2RegistrationResponse(Intent data)
Obtains the registration result.

Parameters

Parameter nameParameter desc
dataIntent returned by the onActivityResult method of the android.app.Activity class.


Return

typedesc
Fido2RegistrationResponseRegistration result.
Method
Fido2AuthenticationResponse  getFido2AuthenticationResponse(Intent data)
Obtains the authentication result.

Parameters

Parameter nameParameter desc
dataIntent returned by the onActivityResult method of the android.app.Activity class.


Return

typedesc
Fido2AuthenticationResponseAuthentication result.