Package-level declarations

Types

Link copied to clipboard
open class UserAccount
This class represents a single user account that is currently logged in against a Salesforce endpoint.
Link copied to clipboard

This class helps build a UserAccount object.

Link copied to clipboard
This class acts as a manager that provides methods to access user accounts that are currently logged in, and can be used to add new user accounts.

Properties

Link copied to clipboard
const val TAG: String

Functions

Link copied to clipboard
fun UserAccountManager.downgradeFromDPoP(userAccount: UserAccount, onSuccess: (userAccount: UserAccount) -> Unit, onFailure: (error: String, errorDesc: String?, e: Throwable?) -> Unit)

Downgrades the userAccount's existing DPoP-bound refresh token to a Bearer (non-DPoP) one, in place — same consumer key, redirect URI, and scopes the account already uses. This is a same-config convenience over migrateRefreshToken with useDPoP = false: no re-consent is expected because nothing about the connected app / External Client App configuration changes.

Link copied to clipboard
fun UserAccountManager.migrateRefreshToken(userAccount: UserAccount? = getInstance().currentUser, appConfig: OAuthConfig, onMigrationSuccess: (userAccount: UserAccount) -> Unit, onMigrationError: (error: String, errorDesc: String?, e: Throwable?) -> Unit)

Attempts to migrate the userAccount to the provided Connected App or External Client Application appConfig.

fun UserAccountManager.migrateRefreshToken(userAccount: UserAccount? = getInstance().currentUser, appConfig: OAuthConfig, useDPoP: Boolean?, onMigrationSuccess: (userAccount: UserAccount) -> Unit, onMigrationError: (error: String, errorDesc: String?, e: Throwable?) -> Unit)

Attempts to migrate the userAccount to the provided Connected App or External Client Application appConfig, with an explicit per-call DPoP intent.

Link copied to clipboard
fun UserAccountManager.upgradeToDPoP(userAccount: UserAccount, onSuccess: (userAccount: UserAccount) -> Unit, onFailure: (error: String, errorDesc: String?, e: Throwable?) -> Unit)

Upgrades the userAccount's existing Bearer (non-DPoP) refresh token to a DPoP-bound one, in place — same consumer key, redirect URI, and scopes the account already uses. This is a same-config convenience over migrateRefreshToken with useDPoP = true: no re-consent is expected because nothing about the connected app / External Client App configuration changes.