getMigrationData

abstract suspend fun getMigrationData(context: Context): LegacyExportedData

Returns all legacy authenticator data as a LegacyExportedData object.

This method is called after isMigrationRequired returns true. The returned object is fed directly into the migration pipeline where OATH and Push mechanisms are extracted and stored in the new credential storage.

Use LegacyDataConverter.convertToLegacyExportedData if your backend implements org.forgerock.android.auth.StorageClient, or construct LegacyExportedData manually for fully custom backends.

Return

LegacyExportedData containing all mechanisms and their associated account data.

Parameters

context

The Android application context.

Throws

if the data cannot be read or deserialised.