UserStorage

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.

interface UserStorage

Functions

Name Summary
add
Brief description


Adds an identity to the storage.


Content
abstract fun add(identity: Identity)



Brief description


Adds a registered user to the user storage.


Content
abstract fun add(user: User)


all
Brief description


Returns all users from the user storage.


Content
abstract fun all(): List<User>


delete
Brief description


Deletes a registered user and its identities from the user storage.


Content
abstract fun delete(user: User)


equals
Content
open operator override fun equals(other: Any?): Boolean


getIdentity
Brief description


Retrieves an identity from the storage.


Content
abstract fun getIdentity(id: UUID): Identity?


getUser
Brief description


Retrieves a registered user from the user storage.


Content
abstract fun getUser(userId: String, projectId: String): User?


hashCode
Content
open override fun hashCode(): Int


loadStorage
Brief description




Prepares the user storage to be used.



Called once on initialization of the SDK.




Content
abstract fun loadStorage()


toString
Content
open override fun toString(): String


update
Brief description


Updates an identity in the user storage.


Content
abstract fun update(identity: Identity)



Brief description


Updates a registered user in the user storage.


Content
abstract fun update(user: User)