FuturaeClient

public final class FuturaeClient

Properties

Link copied to clipboard
private final List<FTAccount> accounts

Get the list of currently active FTAccount objects in the SDK.

Link copied to clipboard

Returns the list of available UnlockMethodType which the SDK may currently be unlocked with.

Link copied to clipboard
private final Boolean isLocked

Checks whether the SDK is locked or not.

Link copied to clipboard
public final static String QR_ENROLL
Link copied to clipboard
public final static String QR_OFFLINE
Link copied to clipboard
public final static String QR_ONLINE
Link copied to clipboard
public final static String QR_USERNAMELESS

Functions

Link copied to clipboard
public final Unit activateBiometrics(FragmentActivity activity, String promptTitle, String promptSubtitle, String promptDescription, String negativeButtonText, Callback<Unit> callback)

Activate the biometric authentication as a means of convenience to verify the user presence, so that the user doesn't have to enter the PIN to unlock the SDK. This method shall only be called when the SDK LockConfigurationType is SDK_PIN_WITH_BIOMETRICS_OPTIONAL.

Link copied to clipboard
Link copied to clipboard
public final Unit approveAuth(String qrCode, FuturaeCallback callback, Array<ApproveInfo> extraInfo)

Approve an online QR Code authentication session which has extra_info. This is a protected operation, so the SDK must be unlocked before calling this method.

public final Unit approveAuth(String userId, String sessionId, Callback<Unit> callback)
public final Unit approveAuth(String userId, String sessionId, FuturaeCallback callback)

Approve an authentication session using the userId and sessionId. This is a protected operation, so the SDK must be unlocked before calling this method.

public final Unit approveAuth(String userId, String sessionId, Integer multiNumberedChallengeResponse, Callback<Unit> callback)

Approve an authentication session using the userId, sessionId and MultiNumberedChallenge. This is a protected operation, so the SDK must be unlocked before calling this method.

public final Unit approveAuth(String userId, String sessionId, FuturaeCallback callback, Array<ApproveInfo> extraInfo)

Approve an authentication session which has extra_info, using the userId and sessionId. This is a protected operation, so the SDK must be unlocked before calling this method.

public final Unit approveAuth(String userId, String sessionId, Array<ApproveInfo> extraInfo, Callback<Unit> callback)
public final Unit approveAuth(String userId, String sessionId, Array<ApproveInfo> extraInfo, Integer multiNumberedChallengeResponse, Callback<Unit> callback)

Approve an authentication session which has extra_info, using the userId, sessionId and multi number challenge response. This is a protected operation, so the SDK must be unlocked before calling this method.

Link copied to clipboard
public final Unit approveAuthWithUsernamelessQrCode(String qrCode, String userId, Array<ApproveInfo> extraInfo, Callback<Unit> callback)

Approve a usernameless QR Code authentication session with optional extra_info. This is a protected operation, so the SDK must be unlocked before calling this method.

Link copied to clipboard
public final Unit changeSDKPin(CharArray newSdkPin, Callback<Unit> callback)

Change the Custom App PIN. This is a protected operation, so the SDK must be unlocked before calling this method.

Link copied to clipboard

Check for MigrateableAccounts, which contains all information around Account Migration from backup.

Link copied to clipboard

Generate the 6-digit OTP that the user needs to enter in the browser when authenticating with the offline QR Code Factor. This is a protected operation, so the SDK must be unlocked before calling this method.

Generates the 6-digit OTP that the user needs to enter in the browser when authenticating with the offline QR Code Factor, when the user presence is verified using the Custom App PIN. This method with the argument sdkPin shall only be used when the SDK LockConfigurationType is SDK_PIN_WITH_BIOMETRICS_OPTIONAL.

public final Unit computeVerificationCodeFromQrcodeWithBiometrics(String qrCode, FragmentActivity activity, String promptTitle, String promptSubtitle, String promptDescription, String negativeButtonText, Callback<String> callback)

Function that generates the 6-digit OTP that the user needs to enter in the browser when authenticating with the offline QR Code Factor, when the user presence is going to be verified using the biometrics. Before calling this function, it should be confirmed that the user has biometrics enabled by using the function getActiveUnlockMethods. This method is only available when the SDK LockConfigurationType is SDK_PIN_WITH_BIOMETRICS_OPTIONAL.

Link copied to clipboard
public final Unit deactivateBiometrics(Callback<Unit> callback)

Deactivate biometrics as an authentication method. This function revokes the biometric authentication capability for unlocking the SDK. This method shall only be called when the SDK LockConfigurationType is SDK_PIN_WITH_BIOMETRICS_OPTIONAL

Link copied to clipboard
public final Unit deleteAccount(String userId)

Delete the account identified by the provided user id from the SDK.

Link copied to clipboard
public final Unit enroll(String code, FuturaeCallback callback)

Standard enroll function, for which the app does not provide an SDK PIN. It needs to be used for all lock configuration types, with the only exception being that the first enrollment for the SDK_PIN_WITH_BIOMETRICS_OPTIONAL lock configuration type needs to take place by using the enrollAndSetupSDKPin function.

Link copied to clipboard
public final Unit enrollAndSetupSDKPin(String code, CharArray sdkPin, Callback<Unit> callback)

Unlocking function that enrolls the user and unlocks the SDK upon success. This method shall only be used on the first enrollment, if the device has no accounts enrolled beforehand. For subsequent enrollments, the enroll method shall be used instead. This function is only available when the SDK LockConfigurationType is set as SDK_PIN_WITH_BIOMETRICS_OPTIONAL.

Link copied to clipboard
public final Unit enrollWithShortcode(String shortcode, FuturaeCallback callback)

Standard enroll function with a provided activation short code instead of a QR code, for which the app does not provide an SDK PIN. It needs to be used for all lock configuration types, with the only exception being that the first enrollment for the SDK_PIN_WITH_BIOMETRICS_OPTIONAL lock configuration type needs to take place by using the enrollAndSetupSDKPin function.

Link copied to clipboard
public final Unit enrollWithShortcodeAndSetupSDKPin(String shortcode, CharArray sdkPin, Callback<Unit> callback)

Unlocking function that enrolls the user with an activation shortcode and unlocks the SDK upon success. This method shall only be used on the first enrollment, if the device has no accounts enrolled beforehand. For subsequent enrollments, the enroll method shall be used instead. This function is only available when the SDK LockConfigurationType is set as SDK_PIN_WITH_BIOMETRICS_OPTIONAL.

Link copied to clipboard

Execute Account Migration. This is a protected operation, so the SDK must be unlocked before calling this method, for the BIOMETRICS_ONLY and BIOMETRICS_OR_DEVICE_CREDENTIALS lock configuration types.

Link copied to clipboard

This is a protected operation, so the SDK must be unlocked before calling this method, for the BIOMETRICS_ONLY and BIOMETRICS_OR_DEVICE_CREDENTIALS lock configuration types. For SDK_PIN_WITH_BIOMETRICS_OPTIONAL this operation is unprotected and unlocks the SDK upon success.

Link copied to clipboard
public final FTAccount getAccountByUserIdAndDeviceId(String userId, String deviceId)

Get the FTAccount identified by the provided user id and device id in the SDK, if it exists

Link copied to clipboard
public final Unit getAccountHistory(String userId, Callback<List<AccountHistory>> callback)

Get Account history for given userIds

Link copied to clipboard
public final List<FTAccount> getAccounts()
Link copied to clipboard

Get accounts statuses for given userIds.

Link copied to clipboard

Returns the list of available UnlockMethodType which the SDK may currently be unlocked with.

Link copied to clipboard
public final JSONArray getDecryptedPushNotificationExtras(Intent pushNotificationIntent)

Decrypt push notification extras under the "extra_info_enc" field of the notification payload. This method requires SDK to be unlocked or configured with LockConfigurationType == LockConfigurationType.NONE

Link copied to clipboard
public final static Array<ApproveInfo> getExtraInfoFromOfflineQrcode(String qrCode)

Extra Session extra_info from QR code.

Link copied to clipboard
public final FTAccount getFTAccountByUserId(String userId)

Get the FTAccount identified by the provided user id in the SDK, if it exists.

Link copied to clipboard

Operation to get an IntegrityResult about the integrity of the app, app-license and device.

Link copied to clipboard
public final static String getQrcodeType(String qrCode)

Returns the provided QR code type.

Link copied to clipboard
public final static String getSessionTokenFromQrcode(String qrCode)

Extract Session token from QR code.

Link copied to clipboard
public final static String getSessionTokenFromUri(String uriStr)

Get the session token based on a provided auth URI.

Link copied to clipboard
public final String getSynchronousAuthToken(String userId)

Returns the JWT for synchronous authentication, for the provided user id.

Link copied to clipboard
public final static String getUserIdFromQrcode(String qrCode)

Extract the User Id from a QR code.

Link copied to clipboard
public final static String getUserIdFromUri(String uriStr)

Get the user id based on a provided auth URI.

Link copied to clipboard
public final Unit handleUri(String uriStr, FuturaeCallback callback)

Operation that handles URIs for enroll or authentication. If the URI cannot be handled, this method will return an error via the provided callback This is a protected operation, so the SDK must be unlocked before calling this method.

Link copied to clipboard

Unlocking function that checks whether the device biometrics have changed. This method is only available when the SDKConfiguration uses setInvalidatedByBiometricChange(true) and LockConfigurationType other than NONE.

Link copied to clipboard
public final Boolean isLocked()
Link copied to clipboard

SDK unprotected function returning true if the SDK has already uploaded the public key to futurae servers. if you encounter FTApiInvalidPublicKeyException, call uploadPublicKey even if this function returns true.

Link copied to clipboard
public final Unit lock()

locking function that immediately locks the SDK. Any subsequent call to a locked method will result in LockOperationIsLockedException.

Link copied to clipboard
public final Unit logout(String userId, FuturaeCallback callback)

Logout the user and remove the account. This is a protected operation, so the SDK must be unlocked before calling this method.

Link copied to clipboard
public final CurrentTotp nextTotp(String userId)

Returns the current 6 digit used in the TOTP offline authentication, for the provided user id. This is a protected operation, so the SDK must be unlocked before calling this method.

public final CurrentTotp nextTotp(String userId, CharArray sdkPin)

Returns the current 6 digit used in the TOTP offline authentication, for the provided user id. This method is only available when the SDK LockConfigurationType is SDK_PIN_WITH_BIOMETRICS_OPTIONAL.

Link copied to clipboard
public final Unit nextTotpWithBiometrics(String userId, FragmentActivity activity, String promptTitle, String promptSubtitle, String promptDescription, String negativeButtonText, Callback<CurrentTotp> callback)

Returns the current 6 digit used in the TOTP offline authentication, for the provided user id. Before calling this function, it should be confirmed that the user has biometrics enabled by using the function getActiveUnlockMethods. This method is only available when the SDK LockConfigurationType is SDK_PIN_WITH_BIOMETRICS_OPTIONAL.

Link copied to clipboard
public final Unit registerPushToken(String token, FuturaeCallback callback)

Register push notifications token.

Link copied to clipboard
public final Unit rejectAuth(String qrCode, Boolean reportFraud, FuturaeCallback callback, Array<ApproveInfo> extraInfo)

Reject an online QR Code authentication session. This is a protected operation, so the SDK must be unlocked before calling this method.

public final Unit rejectAuth(String userId, String sessionId, Boolean reportFraud, FuturaeCallback callback)

Reject an authentication session using the userId and sessionId. This is a protected operation, so the SDK must be unlocked before calling this method.

public final Unit rejectAuth(String userId, String sessionId, Boolean reportFraud, FuturaeCallback callback, Array<ApproveInfo> extraInfo)

Reject an authentication session which has extra_info, using the userId and sessionId. This is a protected operation, so the SDK must be unlocked before calling this method.

Link copied to clipboard
public final Unit rejectAuthWithUsernamelessQrCode(String qrCode, String userId, Boolean reportFraud, Array<ApproveInfo> extraInfo, Callback<Unit> callback)

Approve a usernameless QR Code authentication session with optional extra_info. This is a protected operation, so the SDK must be unlocked before calling this method.

Link copied to clipboard
public final Unit sessionInfoById(String userId, String sessionId, FuturaeResultCallback<SessionInfo> callback)

Get SessionInfo for a given userId and sessionId. This is a protected operation, so the SDK must be unlocked before calling this method.

Link copied to clipboard
public final Unit sessionInfoByToken(String userId, String sessionToken, FuturaeResultCallback<SessionInfo> callback)

Get SessionInfo for given userId and sessionToken. This is a protected operation, so the SDK must be unlocked before calling this method.

Link copied to clipboard
@Deprecated(message = "This is a legacy access method for SDK v1. Use FuturaeSDK.getClient() instead.", replaceWith = @ReplaceWith(imports = {}, expression = "FuturaeSDK.getClient()"))
public final static FuturaeClient sharedClient()
Link copied to clipboard
public final Unit unlockWithBiometrics(FragmentActivity activity, String promptTitle, String promptSubtitle, String promptDescription, String negativeButtonText, Callback<UserPresenceVerification> callback)

Unlocking method that could be called prior to using a locked functionality, when the SDK LockConfigurationType is BIOMETRICS_ONLY or SDK_PIN_WITH_BIOMETRICS_OPTIONAL. This will display a biometric prompt to authenticate the user and the SDK will be unlocked if the verification is successful. Only biometrics classified as androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG are supported.

public final Unit unlockWithBiometricsDeviceCredentials(FragmentActivity activity, String promptTitle, String promptSubtitle, String promptDescription, Callback<UserPresenceVerification> callback)

Unlocking method that should be called prior to using a locked functionality, when the SDK LockConfigurationType is BIOMETRICS_OR_DEVICE_CREDENTIALS. This will display a biometric prompt (or other device-credential authentication) to authenticate the user and depending on its result will unlock the SDK.

Link copied to clipboard

Unlocking method that could be called prior to using a locked functionality, when the SDK LockConfigurationType is SDK_PIN_WITH_BIOMETRICS_OPTIONAL. This will unlock the SDK with the Custom App PIN set during the enrollment. The app needs to implement the relevant mechanism to ask the user to provide the Custom App PIN and then invoke this function.

Link copied to clipboard
public final Unit uploadPublicKey(Callback<Unit> callback)

SDK unprotected function to re-upload the SDK's public key to Futurae servers. Call this method if you encounter FTApiInvalidPublicKeyException