# UserStorage

interface UserStorage

# A type representing storage

Already registered users will be kept in it between app launches.

Methods of this interface must not be called outside of the SDK, as they are intended to be only for internal usage.

Keep in mind, that this interface doesn’t provide any data encryption and developers should take care of this by themselves.

By default this SDK uses a concrete implementation of this interface RoomUserStorage.

# Functions

Name Summary
abstract fun add(identity: Identity)
Adds an identity to the storage.

abstract fun add(user: User)
Adds a registered user to the user storage.
abstract fun all(): List<User>
Returns all users from the user storage.
abstract fun delete(user: User)
Deletes a registered user and its identities from the user storage.
abstract fun getIdentity(id: UUID): Identity?
Retrieves an identity from the storage.
abstract fun getUser(userId: String, projectId: String): User?
Retrieves a registered user from the user storage.
abstract fun loadStorage()
Prepares the user storage to be used.
abstract fun update(identity: Identity)
Updates an identity in the user storage.

abstract fun update(user: User)
Updates a registered user in the user storage.