IamUtil.getCurrentUser()

DESCRIPTION

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

This function blocks until it has succeeded.

DECLARATION

    public abstract IamUser getCurrentUser(Connection connection)

PARAMETERS

connection:
An established connection to the device

THROWS EXCEPTIONS

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

RETURNS

an IamUser instance describing the current user