nabto_device_connection_get_password_authentication_username()

DESCRIPTION

Get the username of the last successful password authentication on the connection. The username is set when a password authentication completes, so a password authentication in progress does not change it. The returned string must be freed using nabto_device_string_free().

DECLARATION

NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API
nabto_device_connection_get_password_authentication_username(NabtoDevice* device, NabtoDeviceConnectionRef ref, char** username)

PARAMETERS

device:
[in] The device.
ref:
[in] The connection reference for which to get username.
username:
[out] Where to put the username string.

RETURNS

  • NABTO_DEVICE_EC_INVALID_CONNECTION: iff connection does not exist
  • NABTO_DEVICE_EC_INVALID_STATE: iff no password authentication has succeeded
  • NABTO_DEVICE_EC_OUT_OF_MEMORY: iff string could not be allocated