Add support for chaning passwords

This commit is contained in:
Christian Kratky
2017-10-25 19:50:37 +02:00
parent c257e5cb77
commit a9b394401b
15 changed files with 52 additions and 46 deletions
@@ -42,7 +42,7 @@ namespace MQTTnet.TestApp.UniversalWindows
private async void Connect(object sender, RoutedEventArgs e)
{
BaseMqttClientOptions options = null;
MqttClientOptions options = null;
if (UseTcp.IsChecked == true)
{
options = new MqttClientTcpOptions
@@ -64,8 +64,12 @@ namespace MQTTnet.TestApp.UniversalWindows
throw new InvalidOperationException();
}
options.UserName = User.Text;
options.Password = Password.Text;
options.Credentials = new MqttClientCredentials
{
Username = User.Text,
Password = Password.Text
};
options.ClientId = ClientId.Text;
options.TlsOptions.UseTls = UseTls.IsChecked == true;
options.TlsOptions.IgnoreCertificateChainErrors = true;