Result
The exhaustive set of outcomes from LegacyTokenMigration.migrate. Branch on it with an exhaustive when to handle success, prior migration, a missing legacy token, and errors.
Inheritors
Types
An error occurred when migrating the token. See the associated exception for details.
The SessionClient supplied to the LegacyTokenMigration.migrate call did not contain a token, migration is not possible.
The token was previously migrated. No changes were made as a result of the LegacyTokenMigration.migrate call. The migrated token was stored in CredentialDataSource with the returned tokenId.
The token migrated successfully. A new Credential was created and stored in the CredentialDataSource; reference it with the returned tokenId via Credential.with(tokenId). The SessionClient passed to migrate has been cleared and must not be used again.