Result

sealed class 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

Link copied to clipboard

An error occurred when migrating the token. See the associated exception for details.

Link copied to clipboard

The SessionClient supplied to the LegacyTokenMigration.migrate call did not contain a token, migration is not possible.

Link copied to clipboard

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.

Link copied to clipboard

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.