The MQTT V5 client allows for an authentication property as part of the connect message. This property consists of a user ID and password. There is no size limitation. The connection fails if the user is not authenticated successfully or is not authorized to connect.
For MQTT V5, use the following:
The argument options contain the user name and password.
Parent topic: Micro broker client