Password authenticate, do a password authentication exchange with a device. Blocks until authentication attempt is complete.
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.
public func passwordAuthenticate(username: String, password: String) throws
- The username (note: use the empty string if using for Password Open Pairing, see https://docs.nabto.com/developer/guides/iam/pairing.html)
- The password (typically the open (global) or invite (per-user) pairing password)
Throws the following errors:
- if the username or password is invalid
- if the password authentication feature is not available on the device
- if the connection is not open
- if a password authentication request is already in progress on the connection
- if too many password attempts has been made