Authentication with client ID and username

It is possible to use the authentication in a mongo database to match the username , client ID and password at the same time?

Right now I fork and modify github.com/iegomez/mosquitto-go-auth to check if the clientID, username and password is the same like in my database.

If this is not possible there is anyway to make that two program cant connect with the same username?

Sorry, if you’re asking about authentication when accessing MongoDB, I’m afraid we can’t help.

If you are asking about using MongoDB as a data source for MQTT device authentication in EMQX, what you want can be achieved, as long as the filter field is configured as the following:

{
    username = "${username}"
    clientid = "${clientid}"
}