Kotlin: IamUtil.awaitGetCurrentUser()

DESCRIPTION

Get details about the user that has opened the current connection to the device.

This function is meant to be used in a Kotlin coroutine to suspend execution until the operation has completed.

DECLARATION

suspend fun IamUtil.awaitGetCurrentUser(
    connection: Connection,
): IamUser 

PARAMETERS

connection:
An established connection to the device

THROWS EXCEPTIONS

USER_DOES_NOT_EXIST:
if the current user is not paired with the device.
IAM_NOT_SUPPORTED:
if Nabto Edge IAM is not supported by the device

RETURNS

an IamUser instance describing the current user