SudoProfilesClient

Interface encapsulating a library of functions for calling Sudo service and managing Sudos.

Inheritors

Types

Link copied to clipboard
class Builder(context: Context, sudoUserClient: SudoUserClient, blobContainerURI: Uri)

Builder used to construct SudoProfilesClient.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val version: String

Client version.

Functions

Link copied to clipboard
abstract suspend fun createSudo(sudo: Sudo): Sudo

Creates a new Sudo

Link copied to clipboard
abstract suspend fun deleteSudo(sudo: Sudo)

Deletes a Sudo.

Link copied to clipboard

Export encryption keys used for encrypting and decrypting Sudo claims.

Link copied to clipboard

Generate an encryption key to use for encrypting Sudo claims. Any existing keys are not removed to be able to decrypt existing claims but new claims will be encrypted using the newly generated key.

Link copied to clipboard
abstract suspend fun getOwnershipProof(sudo: Sudo, audience: String): String

Retrieves a signed ownership proof for the specified owner. The ownership proof JWT has the following payload. { "jti": "DBEEF4EB-F84A-4AB7-A45E-02B05B93F5A3", "owner": "cd73a478-23bd-4c70-8c2b-1403e2085845", "iss": "sudoplatform.sudoservice", "aud": "sudoplatform.virtualcardservice", "exp": 1578986266, "sub": "da17f346-cf49-4db4-98c2-862f85515fc4", "iat": 1578982666 }

Link copied to clipboard
abstract fun getSymmetricKeyId(): String?

Get the current (most recently generated) symmetric key ID used for encryption.

Link copied to clipboard
abstract fun importEncryptionKeys(keys: List<EncryptionKey>, currentKeyId: String)

Import encryption keys to use for encrypting and decrypting Sudo claims. All existing keys will be removed before the new keys are imported.

Link copied to clipboard
abstract suspend fun listSudos(option: ListOption): List<Sudo>

Retrieves all Sudos owned by the signed in user.

Link copied to clipboard
abstract fun reset()

Reset any internal state and cached content.

Link copied to clipboard
abstract suspend fun subscribeAsync(id: String, subscriber: SudoSubscriber)

Subscribes to be notified of new, updated and deleted Sudos. Blob data is not downloaded automatically so the caller is expected to use listSudos API if they need to access any associated blobs.

abstract suspend fun subscribeAsync(id: String, changeType: SudoSubscriber.ChangeType, subscriber: SudoSubscriber)

Subscribes to be notified of new, updated or deleted Sudos. Blob data is not downloaded automatically so the caller is expected to use listSudos API if they need to access any associated blobs.

Link copied to clipboard
abstract fun unsubscribe(id: String)

Unsubscribes the specified subscriber so that it no longer receives change notifications.

abstract fun unsubscribe(id: String, changeType: SudoSubscriber.ChangeType)

Unsubscribes the specified subscriber so that it no longer receives notifications about new, updated or deleted Sudos.

Link copied to clipboard
abstract fun unsubscribeAll()

Unsubscribe all subscribers from receiving notifications about new, updated or deleted Sudos.

Link copied to clipboard
abstract suspend fun updateSudo(sudo: Sudo): Sudo

Updates a Sudo.