Class Fido2UiCallback
The application must provide a concrete implementation of this class to handle UI interactions such as authenticator selection and transaction confirmation. All methods in this callback are invoked on the main UI thread.
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidretrieveAuthenticatorDescription(Fido2AuthenticatorInfo selectedAuthenticator, AuthenticatorDescriptionCallback callback) Called when the SDK needs a custom, user-friendly description for an authenticator.abstract voidshowAuthenticators(List<Fido2AuthenticatorInfo> authenticators, AuthenticatorSelectionCallback callback) Called when more than one authenticator matches the policy in the FIDO2 request, requiring the user to select one.abstract voidshowTransactionDetails(Map<String, String> transactionDetails, TransactionDetailsCallback callback) Called when user confirmation is required for a transaction with payload (Transaction Confirmation Display).
-
Constructor Details
-
Fido2UiCallback
public Fido2UiCallback()
-
-
Method Details
-
showAuthenticators
@MainThread public abstract void showAuthenticators(@NonNull List<Fido2AuthenticatorInfo> authenticators, @NonNull AuthenticatorSelectionCallback callback) throws Fido2Exception Called when more than one authenticator matches the policy in the FIDO2 request, requiring the user to select one.The application should display a list of the provided authenticators to the user. Once the user makes a selection, the application must call
AuthenticatorSelectionCallback.onAuthenticatorSelected(int)to proceed, orAuthenticatorSelectionCallback.cancel()to abort the operation.If this method is not implemented, the SDK will automatically select the first available authenticator.
- Parameters:
authenticators- A list ofFido2AuthenticatorInfoobjects representing the available authenticators.callback- The callback to be used to return the user's selection to the SDK.- Throws:
Fido2Exception- if an error occurs, for example, if none of the provided authenticators are usable.- Since:
- 1.0.0
-
retrieveAuthenticatorDescription
@MainThread public abstract void retrieveAuthenticatorDescription(@NonNull Fido2AuthenticatorInfo selectedAuthenticator, @NonNull AuthenticatorDescriptionCallback callback) Called when the SDK needs a custom, user-friendly description for an authenticator.The application can provide a custom name (e.g., "My Phone's Fingerprint") by calling
AuthenticatorDescriptionCallback.onAuthenticatorDescriptionProvided(AuthenticatorDescriptor).- Parameters:
selectedAuthenticator- Information about the authenticator that needs a description.callback- The callback to return the customAuthenticatorDescriptor.- Since:
- 1.0.0
-
showTransactionDetails
@MainThread public abstract void showTransactionDetails(@NonNull Map<String, String> transactionDetails, @NonNull TransactionDetailsCallback callback) Called when user confirmation is required for a transaction with payload (Transaction Confirmation Display).The application should display the transaction details to the user and ask for confirmation. The application must then call
TransactionDetailsCallback.onProceed()to continue orTransactionDetailsCallback.cancel()to abort.- Parameters:
transactionDetails- A map containing the transaction details to be displayed.callback- The callback to signal the user's decision.- Since:
- 1.2.0
-