MQTTnet
MQTTnet copied to clipboard
Is it possible to access to requested URL on client connect?
I have a server running mqttnet and I have given unique subdomain for each of clients(client1.x.com, client2.x.com, ...). I have also created username/password for the devices which want to publish/subscribe to the server. I want to validate mqtt client before connecting to server and to validate the client I need to access the calling url to extract the subdomain and then validate assigned username/password. How can I access to the URL?
Hi, that is not supported at the moment. But "named endpoints" (which are basically identified via its unique ID) are on my list already. Best regards Christian
Perfect, thanks!
I just need to know the URL, not binding to named endpoint. Is there anyway to determine the called endpoint rather than IP address?
With the latest version you now have access to the internally used HTTP Context when using ASP.NET. Please check the property ChannelAdapter in class ValidatingConnectionEventArgs. The summary comment explains how to cast the value properly. If this does not fix this issue, please reopen the ticket.