Return custom info in user properties of MQTT CONNACK #10121
-
We intend to provide additional custom information to devices upon connecting to the EMQX broker. Our proposed approach involves adding this information to the user properties section of the MQTT CONNACK packet. We acknowledge that the HTTP_AUTH_PLUGIN is designed solely to provide an "allow" or "deny" response to the EMQX broker. Are there alternative methods to return custom information to devices following authentication? For instance, could the gRPC Hook be utilized for this purpose? Environment: EMQX v5 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi. |
Beta Was this translation helpful? Give feedback.
-
Oh, even better than http auth: jwt. |
Beta Was this translation helpful? Give feedback.
-
Sorry I did not read the question carefully. |
Beta Was this translation helpful? Give feedback.
Sorry I did not read the question carefully.
There is unfortunately no way to insert properties to CONNACK using the current authentication plugins.
You may consider implementing your own plugin to hook into this hookpoint.
https://github.com/emqx/emqx-plugin-template/blob/e7c17ce64d84b54e69973a823e3aca9d417c0e21/src/emqx_plugin_template.erl#L33