[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mosquitto-dev] Using mosquitto C client for token based authentication with MQTT broker
|
Hi,
I haven't used Watson IOT before but found this documentation page:
https://console.bluemix.net/docs/services/IoT/devices/mqtt.html#mqtt
User name: The user name is the same value for all devices:
use-token-auth. This value causes Watson IoT Platform to use the
device's authentication token, which is specified as the password.
Password: The password for each device is the unique authentication
token that was generated when the device was registered with Watson IoT
Platform.
So based on that the code should look something like this:
mosquitto_username_pw_set(mosq, "use-token-auth", token);
nick.
On 2018-04-24 12:33, Supriya Jagtap wrote:
Hi,
I would like to know if token based authentication is possible with
mosquitto c client library api and how?
I went through api documentation and came across
mosquitto_username_pw_set and mosquitto_tls_opts_set. I tried setting
username password and TLS options, but couldn't connect to the MQTT
broker (IBM Watson IOT service).
Am I missing anything here?
Thanks & Regards,
Supriya Jagtap
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev