IdentifyKitApi

The IdentifyKit interface provides a set of properties and methods for managing user identification.

Properties

Link copied to clipboard
abstract var credentials: Credentials?

The user's authentication credentials.

Link copied to clipboard
abstract var identifier: String

Unique MonterosaKit identifier

Link copied to clipboard
abstract val listener: ERROR CLASS: Symbol not found for MulticastListener<co/monterosa/sdk/common/interfaces/IdentifyKitListener>

The listeners registered via add, notified of identity state changes.

Link copied to clipboard
abstract val signature: Signature?

The current session signature, or null if none is cached.

Link copied to clipboard
abstract val userData: UserData?

The current user data, or null if none is cached.

Functions

Link copied to clipboard
abstract fun add(listener: IdentifyKitListener)

Adds IdentifyKitListener into IdentifyKit

Link copied to clipboard
abstract fun configure(configurationProvider: ERROR CLASS: Symbol not found for ConfigurationProvider)

Called once this kit is registered, before MonterosaKit.load.

Link copied to clipboard
abstract suspend fun getSessionSignature(options: ERROR CLASS: Symbol not found for Options?? = null): Result<Signature>

Returns the user's session signature, from signature if already cached, otherwise by fetching it from the Monterosa API.

Link copied to clipboard
abstract suspend fun getUserData(options: ERROR CLASS: Symbol not found for Options?? = null): Result<UserData>

Returns the user's UserData, from userData if already cached, otherwise by fetching it from the Monterosa API.

Link copied to clipboard
abstract fun logout()

A function that requests a user logout and removing their signature and credentials.

Link copied to clipboard
abstract fun remove(listener: IdentifyKitListener)

Removes a previously added IdentifyKitListener, so it no longer receives notifications.

Link copied to clipboard
abstract suspend fun updateUserData(data: Map<String, Any>, options: ERROR CLASS: Symbol not found for Options?? = null): Result<UserData>

Updates the signed-in user's data via the Identify Public API, and caches the result the same way as getUserData. Unlike getUserData, this always makes a request rather than returning a cached userData.