Is your feature request related to a problem? Please describe.
Hi, I am working on a project which the broker needs a JWT token as password for authentication.
This brings the problem when I am using autopaho, which is after cm, _ = autopaho.NewConnection(ctx, cfg), it is not possible to update the cm with a new password from with a refreshed JWT, unless I actively knock off the current cm and get a new one.
If my client gets disconnected passively, autopaho will never be able to reconnect since JWT is out of date and then always get disconnected with code 0x86.
Describe the solution you'd like
The first thing come into my mind is that to change NewConnection() from:
Is your feature request related to a problem? Please describe. Hi, I am working on a project which the broker needs a JWT token as password for authentication. This brings the problem when I am using autopaho, which is after
cm, _ = autopaho.NewConnection(ctx, cfg)
, it is not possible to update thecm
with a new password from with a refreshed JWT, unless I actively knock off the current cm and get a new one. If my client gets disconnected passively, autopaho will never be able to reconnect since JWT is out of date and then always get disconnected with code 0x86.Describe the solution you'd like The first thing come into my mind is that to change
NewConnection()
from:to
But I have not dig into detail to see if this is feasible.
Describe alternatives you've considered Any other ideas you may have please let me know. Thanks!
Additional context I am using v0.12.0 currently.