Get the username used for password authentication if it was attempted. The username is set during the authentication process, meaning the username should only be used if a prior call to nabto_device_connection_is_password_authenticated() returned true. The returned string must be freed using nabto_device_string_free().
NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API nabto_device_connection_get_password_authentication_username(NabtoDevice* device, NabtoDeviceConnectionRef ref, char** username)
- [in] The device.
- [in] The connection reference for which to get username.
- [out] Where to put the username string.
NABTO_DEVICE_EC_INVALID_CONNECTION iff connection does not exist NABTO_DEVICE_EC_INVALID_STATE iff password authentication not performed NABTO_DEVICE_EC_OUT_OF_MEMORY iff string could not be allocated