Class Overview
The entry point for interacting with the regular app Fido2 APIs.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
Fido2ApiClient
(Activity activity)
Parameters |
activity |
Activity |
public
Fido2ApiClient
(Context context)
Parameters |
context |
Context |
Public Methods
Creates a Task with Fido2PendingIntent
, when started, will issue a Fido2 registration
request, which is done once per FIDO2 device per account for associating the new FIDO2 device
with that account. For example:
Task result = mFido2ApiClient.getRegisterIntent(requestOptions);
...
result.addOnSuccessListener(
new OnSuccessListener() {
@Override
public void onSuccess(Fido2PendingIntent fido2PendingIntent) {
if (fido2PendingIntent.hasPendingIntent()) {
// Start a FIDO2 registration request.
fido2PendingIntent.launchPendingIntent(this, REGISTER_REQUEST_CODE);
}
}
});
result.addOnFailureListener(
new OnFailureListener() {
@Override
public void onFailure(Exception e) {
// Fail
}
}
Parameters |
requestOptions |
MakeCredentialOptions : for the registration request |
Creates a Task with Fido2PendingIntent
, when started, will issue a Fido2 signature
request for a relying party to authenticate a user. For example:
Task result = mFido2ApiClient.getSignIntent(requestOptions);
...
result.addOnSuccessListener(
new OnSuccessListener() {
@Override
public void onSuccess(Fido2PendingIntent fido2PendingIntent) {
if (fido2PendingIntent.hasPendingIntent()) {
// Start a FIDO2 sign request.
fido2PendingIntent.launchPendingIntent(this, SIGN_REQUEST_CODE);
}
}
});
result.addOnFailureListener(
new OnFailureListener() {
@Override
public void onFailure(Exception e) {
// Fail
}
}
Parameters |
requestOptions |
PublicKeyCredentialRequestOptions : for the sign request |