Expose binary password to MqttConnectionValidatorContext.

This commit is contained in:
Christian Kratky
2019-05-27 19:57:36 +02:00
parent ccfe67e6a6
commit 2d03c267e4
4 changed files with 15 additions and 18 deletions
+1 -2
View File
@@ -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;
}