We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specs: https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Re-authentication
Originally posted by sseiber February 26, 2024 I'm using JWT Token authentication sucessfully by setting the mqtt client properties before connecting:
properties: { authenticationMethod: 'OAUTH2-JWT', // for Azure EventGrid authenticationData: <auth-token> }
I need to be able to re-authenticate with the service when the token needs to be refreshed by sending an auth packet:
{ cmd: 'auth', reasonCode: 0x19, properties: { authenticationMethod: 'OAUTH2-JWT', authenticationData: <auth-token> } }
However, I don't see a way to send a specific packet. I'm following an example that uses MQTTnet to provide this functionality (see SendExtendedAuthenticationExchangeDataAsync): https://github.com/dotnet/MQTTnet/blob/f82d382f23ec8388ed8a33c48b7ede08e2c18622/Source/MQTTnet/Client/MqttClient.cs#L296
Is there a method or standard pattern in mqtt.js for doing this?
The text was updated successfully, but these errors were encountered:
Hello @robertsLando , Facing the same feature needs, any news on this ?
Have you a workaround idea ?
Sorry, something went wrong.
You can build and send the packet manually with something like: https://github.com/mqttjs/MQTT.js/blob/main/src/lib/client.ts#L893
If anyone is interested in this you could add a bounty for this here: https://gitpay.me
Hi, can I contribute to this feature as well @robertsLando?
@suraj-mandal sure
robertsLando
No branches or pull requests
Specs: https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Re-authentication
Discussed in #1794
Originally posted by sseiber February 26, 2024
I'm using JWT Token authentication sucessfully by setting the mqtt client properties before connecting:
I need to be able to re-authenticate with the service when the token needs to be refreshed by sending an auth packet:
However, I don't see a way to send a specific packet. I'm following an example that uses MQTTnet to provide this functionality (see SendExtendedAuthenticationExchangeDataAsync):
https://github.com/dotnet/MQTTnet/blob/f82d382f23ec8388ed8a33c48b7ede08e2c18622/Source/MQTTnet/Client/MqttClient.cs#L296
Is there a method or standard pattern in mqtt.js for doing this?
The text was updated successfully, but these errors were encountered: