Password Authentication

Password authenticate the client and the device. The password authentication is bidirectional and based on PAKE, such that both the client and the device learns that the other end knows the password, without revealing the password to the other end. Only one password authentication listener can exist on the system. The Nabto IAM module can be used to handle password authorization requests.

Usage:

  1. Create a new listener. nabto_device_listener_new()
  2. Init the listener to listen for password_authentication_requests. nabto_device_password_authentication_request_init_listener()
  3. Listen for events on the listener. nabto_device_listener_new_password_authentication_request()
  4. Handle the password authentication request 4a. Get the username used for the request. nabto_device_password_authentication_request_get_username() 4b. Set a password to use with the username. nabto_device_password_authentication_request_set_password() 4c. Free the password authentication request. nabto_device_password_authentication_request_free()
  5. Later, use the state of the password exchange. nabto_device_connection_is_password_authenticated()