icanos / ng2-mqtt

Angular2 port of the mqttws31 library
17 stars 24 forks source link

How to user autentication? #21

Open pedrofelipest opened 6 years ago

pedrofelipest commented 6 years ago

which method to use to send user data and password for authentication?

liyunfeng01 commented 6 years ago

try the connect method like this: this._client.connect({ userName: 'admin', password: 'password', onSuccess: this.onConnected.bind(this) });