eclipse-paho / eclipse-paho/paho.mqtt.java
Connection credentials expiration (JWT)
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
- [ no] Bug exists Release Version 1.2.5 ( Master Branch)
- [ no] Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
- [ no] Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
We are using the `MqttClient` v mqttv3 1.2.2. We have the same issue as described in https://github.com/eclipse/paho.mqtt.c/issues/808. How do we solve it in the java client? Should we do the same as the suggestion in https://github.com/eclipse/paho.mqtt.c/issues/808#issuecomment-622668215, and if so could you please provide more details how exactly that is done?
Otherwise, could we rely on the built-in auto-reconnection and override the `MqttConnectOptions.getPassword()` to provide a (potentionally new) valid token whenever called? Looking at the code of the client, this seems like it should work, but then it is not officially documented, that the built-in auto-reconnect always uses the connect options(instead of for example caching the settings in an entirely different object).
Contributor guide
Assessment
This issue has not been assessed yet.