plugin: Need CONNECT properties in MOSQ_EVT_BASIC_AUTH handler
We have an existing plugin that, for MQTT v5 clients use user defined properties to send additional data to the username and password. All values are used to perform authentication. We are moving away from MQTTv3 clients, which append additional data on the client ID.
Currently, we have a locally modified version of Mosquitto 1.6.2 that pulls the additional property values from the CONNECT message and makes them available on the mosquitto structure. We're also trying to move away from a local version of Mosquitto. But our problem is that the CONNECT message properties are not available.
As an enhancement, can a mosquitto_properties struct member be added to mosquitto_evt_basic_auth populated with any properties present on the CONNECT message?
Looking at src/handle_connect.c, the properties are read in (and freed!) before calling mosquitto_unpwd_check. So the data flow is close.
Is this the type of change for which a patch might be reviewed and, possibly, accepted?
That sounds eminently reasonable to me, one of the future pointers can be changed to be a pointer to the properties.
Thanks for getting back.
one of the
futurepointers can be changed to be a pointer to the properties.
Got you. Will do.