Class BiometricAuth
- java.lang.Object
-
- org.forgerock.android.auth.biometric.BiometricAuth
-
@RestrictTo(LIBRARY) public class BiometricAuth extends java.lang.ObjectHelper class for managing Biometric Authentication Process.
-
-
Field Summary
Fields Modifier and Type Field Description static intERROR_NO_BIOMETRICSstatic intERROR_NO_DEVICE_CREDENTIAL
-
Constructor Summary
Constructors Constructor Description BiometricAuth(java.lang.String title, java.lang.String subtitle, boolean allowDeviceCredentials, androidx.fragment.app.FragmentActivity activity, BiometricAuthCompletionHandler biometricAuthListener)Initializes Biometric authentication with the caller and callback handlers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthenticate()androidx.fragment.app.FragmentActivitygetActivity()Return the activity of the client application that will host the prompt.BiometricAuthCompletionHandlergetBiometricAuthListener()Return the Biometric Authentication listener used to return authentication result.android.app.KeyguardManagergetKeyguardManager()Return the mechanism used to lock and unlock the device.java.lang.StringgetSubtitle()The subtitle to be displayed on the prompt.java.lang.StringgetTitle()The title to be displayed on the prompt.
-
-
-
Field Detail
-
ERROR_NO_BIOMETRICS
public static final int ERROR_NO_BIOMETRICS
- See Also:
- Constant Field Values
-
ERROR_NO_DEVICE_CREDENTIAL
public static final int ERROR_NO_DEVICE_CREDENTIAL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BiometricAuth
public BiometricAuth(java.lang.String title, java.lang.String subtitle, boolean allowDeviceCredentials, @NonNull androidx.fragment.app.FragmentActivity activity, @NonNull BiometricAuthCompletionHandler biometricAuthListener)Initializes Biometric authentication with the caller and callback handlers. If device has no Biometric enrolled, it fallback to device credentials authentication.- Parameters:
title- the title to be displayed on the prompt.subtitle- the subtitle to be displayed on the prompt.allowDeviceCredentials- iftrue, accepts device PIN, pattern, or password to process notification.activity- the activity of the client application that will host the prompt.biometricAuthListener- listener for receiving the biometric authentication result.
-
-
Method Detail
-
getKeyguardManager
public android.app.KeyguardManager getKeyguardManager()
Return the mechanism used to lock and unlock the device.- Returns:
- the KeyguardManager instance.
-
getTitle
public java.lang.String getTitle()
The title to be displayed on the prompt.- Returns:
- the Title as String.
-
getSubtitle
public java.lang.String getSubtitle()
The subtitle to be displayed on the prompt.- Returns:
- the Subtitle as String.
-
getBiometricAuthListener
public BiometricAuthCompletionHandler getBiometricAuthListener()
Return the Biometric Authentication listener used to return authentication result.- Returns:
- the Biometric Authentication listener.
-
getActivity
public androidx.fragment.app.FragmentActivity getActivity()
Return the activity of the client application that will host the prompt.- Returns:
- the Activity that hosts the prompt.
-
authenticate
public void authenticate()
-
-