-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add license check to Intercepting Publish on server #2099
Comments
I think what I need is in this article https://github.com/dotnet/MQTTnet/wiki/Server#intercepting-application-messages |
You can check https://github.com/dotnet/MQTTnet/blob/master/Samples/Server/Server_Intercepting_Samples.cs as the Wiki is for version 3 only.
E.g. public void InterceptPublishAsync (PublishEventArgs args)
{
var someLicenseCheck = true;
if (!someLicenseCheck)
{
args.Publish = false;
}
} |
Thank you. That worked perfectly. |
Just for reference, it's
I guess, this can be closed now. |
I would like to add a license check to InterceptingPublishAsync and if the license has not been entered then reject publish to
subscribers if license is not valid. First is InterceptingPublishAsync the right place to do this, second how to tell publisher that
license needs to be entered.
The text was updated successfully, but these errors were encountered: