Class Overview
The entry point for interacting with the regular app U2F APIs.
U2F (Universal Second Factor) is the name of the Security Key protocol in FIDO (Fast IDentity
Online), which is the industry alliance where Security Keys are being standardized.
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
U2fApiClient
(Activity activity)
Parameters |
activity |
Activity : Calling Activity |
public
U2fApiClient
(Context context)
Parameters |
context |
Context : The Context of the calling application |
Public Methods
Creates a Task with U2fPendingIntent
. When this Task object starts, it issues a U2F
registration request, which is done once per U2F device per account for associating the new U2F
device with that account. For example:
Task result = mU2fApiClient.getRegisterIntent(registerRequestParams);
...
result.addOnSuccessListener(
new OnSuccessListener() {
@Override
public void onSuccess(U2fPendingIntent u2fPendingIntent) {
if (u2fPendingIntent.hasPendingIntent()) {
// Start a U2F registration request.
u2fPendingIntent.launchPendingIntent(this, REGISTER_REQUEST_CODE);
}
}
});
result.addOnFailureListener(
new OnFailureListener() {
@Override
public void onFailure(Exception e) {
// Fail
}
}
Parameters |
requestParams |
RegisterRequestParams : for the registration request |
Creates a Task with U2fPendingIntent
. When this Task object starts, it issues a U2F
signing request for a relying party to authenticate a user. For example:
Task result = mU2fApiClient.getSignIntent(registerRequestParams);
...
result.addOnSuccessListener(
new OnSuccessListener() {
@Override
public void onSuccess(U2fPendingIntent u2fPendingIntent) {
if (u2fPendingIntent.hasPendingIntent()) {
// Start a U2F sign request.
u2fPendingIntent.launchPendingIntent(this, SIGN_REQUEST_CODE);
}
}
});
result.addOnFailureListener(
new OnFailureListener() {
@Override
public void onFailure(Exception e) {
// Fail
}
}
Parameters |
requestParams |
SignRequestParams : for the sign request |