Skip to content
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

Can it be used with broker requiring credentials #3

Open
Strooom opened this issue Dec 3, 2021 · 1 comment
Open

Can it be used with broker requiring credentials #3

Strooom opened this issue Dec 3, 2021 · 1 comment

Comments

@Strooom
Copy link

Strooom commented Dec 3, 2021

Hi Fred,

I am considering using your library in order to build a test-bench for integration testing : the PC application would inject msgs towards devices under test, and listen for their responses.
Our broker requires to connect with username and password. I see those appearing in the source code but I am not sure how to use them. Can you provide a small example with username and password ?

Tnx!

@fredilarsen
Copy link
Owner

fredilarsen commented Dec 3, 2021

@Strooom
I will add a setter for user name and password.

Until I get this added and tested, you can try to set the user and password data members after constructing the object but before using it. Please report back whether it is working or not.

ReconnectingMqttClient client(ip, 1883, "simpleclient");
client.user = "user1";
client.password = "password1";
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants