public class OtpModule
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static OtpModule |
create()
Create OtpModule object.
|
boolean |
isMigrationNeededForAndroidQ(java.lang.String tokenName)
Check if the migration is needed for Android Q with the given token name.
|
void |
migrateForAndroidQ(java.lang.String tokenName,
byte[] customData)
Migrate the old token to be compatible with Android Q.
|
boolean |
reset()
Cleanup the data associated with OTP module.
|
public static OtpModule create()
public boolean isMigrationNeededForAndroidQ(java.lang.String tokenName) throws IdpException
migrateForAndroidQ(String, byte[])
.
NOTE: This API should be called during the application startup to make sure that the permission popup, if any, will not interfere with other business flow.
For more information on Android Q privacy changes, refer to https://developer.android.com/preview/privacy/data-identifiers#device-ids
tokenName
- The token name.IdpStorageException
- When database operation failed.PasswordManagerException
- When the TOKEN domain is not logged in using the password manager.IdpException
migrateForAndroidQ(String, byte[])
public void migrateForAndroidQ(java.lang.String tokenName, byte[] customData) throws IdpException
For more information on Android Q privacy changes, refer to https://developer.android.com/preview/privacy/data-identifiers#device-ids
tokenName
- The name of the token to be migrated.customData
- The custom data.IdpStorageException
- When database operation failed.PasswordManagerException
- When the TOKEN domain is not logged in using the password manager.DeviceFingerprintException
- When the fingerprint data does not match.IdpException
isMigrationNeededForAndroidQ(String)
public boolean reset() throws IdpException
IdpException
- when database operation failed.IdpCore.reset()