Closed Klaster1 closed 8 years ago
Hi, when you set your connect options do you set password? If you do not set any password property in the connectOptions, then it should be left null.
When I don't set password and set userName, the following error is thrown:
mqttws31.js:1741 Uncaught Error: AMQJS0013E Invalid argument undefined for connectOptions.password.
If I set password to null, then I get another error thrown by validate function:
AMQJS0012E Invalid type object for password.validate @ mqttws31.js:138
Looks like the if statement responsible for checking if a password had been supplied without a username had been switched. I've resolved this and delivered the changes to the develop branch which should move to release at the beginning of June.
The server I connect to uses username only for authentication, so I wan't to omit it from options passed to
connect
. But this line of mqttws31.js specifies that password option should be of "string" type.Luckily, I can set
password: null
as a prototype property in order to bypass type validation:Maybe something should be done about it?