-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
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
How to check if a client is disconnected from the broker #294
Comments
I don't know why you want to limit connections to the broker itself, but you're probably better off handling it there. |
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: