IamUtil.createUser()
DESCRIPTION
Create an IAM user on device.
This function blocks until it has succeeded.
See https://docs.nabto.com/developer/guides/iam/intro.html for an intro to the concept of users and roles.
DECLARATION
public abstract void createUser(Connection connection, String username, String password, String role)
PARAMETERS
connection:- An established connection to the device
username:- Username for the new user
password:- Password for the new user
role:- IAM role for the new user
THROWS EXCEPTIONS
IamException:- with IamError
INVALID_INPUTif username is not valid as per https://docs.nabto.com/developer/api-reference/coap/iam/post-users.html#request IamException:- with IamError
BLOCKED_BY_DEVICE_CONFIGURATIONif the device configuration does not allow the current user to create a new user (theIAM:CreateUseraction is not allowed for the requesting role) IamException:- with IamError
ROLE_DOES_NOT_EXISTthe specified role does not exist in the device IAM configuration IamException:- with IamError
IAM_NOT_SUPPORTEDif Nabto Edge IAM is not supported by the device