Closed kingflurkel closed 9 years ago
Yes it is implemented and tested!
Supply the username and password in <mqtt-connection>.options
and then connect the connection with <mqtt-connection>.connect()
. Currently there is no flag to indicate that credentials are needed and having the auto
flag set will perform a connect right away. I will open up an issue to address this.
_computeOption: function (username, password) {
var options = {
protocolId: "MQTT",
protocolVersion: 4,
keepalive: 10,
reconnectPeriod: 1000,
clientId: "",
encoding: "string",
username: username,
password: password
};
return options
},
Aha! Now I see. I was trying to use the options attr. but it first connects so no options are sent. Thanks for your reply.
Also, I can't seem to use http://, it overwrites it with ws://.
Do you mean <mqtt-connection url="http://foo.bar">
?
Yes
Your issue should be fixed with 4bb8ae330e3e1c41f0b7f0e1f7511e2aff9ca4f0 and 2c90804827aada9daafd4e3310e0fb13fecc937b. Can you pleas try it again?
Will do, thanks!
My broker want guest / guest username and password. I can't seem to get this working with the "options" attribute. Is this implemented already?