mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-25 23:53:07 +08:00
Add support for chaning passwords
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user