You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the HTTP auth plugin for authentication, that calls into a REST API hosted by a Node.js process. I want to implement a feature where I don't want to allow multiple connections to the broker by a user. I am using auth_opt_http_getuser_uri to get the login request, I verify the request and let the user to connect if the credentials are correct. I want to cache or store the session information about the user and don't want another connection to be made by the same user if it the user is already connected. It is simple to implement if I could find an option that can call an HTTP method when a client is disconnected; I will clear the session/cache in that case, and the user will be able to connect again. I want to know if such option present in the HTTP auth plugin that can call a function when the client is disconnected? Or, could someone suggest me a solution to the problem i.e. don't want to allow multiple connection from the same user.
The text was updated successfully, but these errors were encountered:
I don't know why you want to limit connections to the broker itself, but you're probably better off handling it there.
So I'd recommend forking the plugin and implementing it at this level, your http backend shouldn't worry about connections to the broker.
I want to do that to safeguard another connection in case our device password is leaked. I can implement that but I don't know how the broker will call the disconnect function on the plugin interface?
I am using the HTTP auth plugin for authentication, that calls into a REST API hosted by a Node.js process. I want to implement a feature where I don't want to allow multiple connections to the broker by a user. I am using auth_opt_http_getuser_uri to get the login request, I verify the request and let the user to connect if the credentials are correct. I want to cache or store the session information about the user and don't want another connection to be made by the same user if it the user is already connected. It is simple to implement if I could find an option that can call an HTTP method when a client is disconnected; I will clear the session/cache in that case, and the user will be able to connect again. I want to know if such option present in the HTTP auth plugin that can call a function when the client is disconnected? Or, could someone suggest me a solution to the problem i.e. don't want to allow multiple connection from the same user.
The text was updated successfully, but these errors were encountered: