mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 17:23:04 +08:00
Expose binary password to MqttConnectionValidatorContext.
This commit is contained in:
@@ -28,8 +28,7 @@ namespace MQTTnet.TestApp.NetCore
|
||||
{
|
||||
if (p.ClientId == "SpecialClient")
|
||||
{
|
||||
var password = Encoding.UTF8.GetString(p.Password);
|
||||
if (p.Username != "USER" || password != "PASS")
|
||||
if (p.Username != "USER" || p.Password != "PASS")
|
||||
{
|
||||
p.ReturnCode = MqttConnectReturnCode.ConnectionRefusedBadUsernameOrPassword;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user