Now that we have configured the mosquito, A, to require authentication from its clients, let's go
and repeat the examples that you looked at a couple of years ago and create subscribers and publishers
that authenticate themselves to the broker.
So I'm going to do this first on the command line and then on the embedded ebooks client in the documentation
for mosquito publisher and subscriber.
We learned that we use the EU switch the way you switch to pass on the user name and the capital P,
which should be somewhere here.
Think the capital P or minus minus pay W for the password, so that's what we are going to use first.
I'm going to create a subscriber and that is mosquito sub.
And the user name is Peter.
I keep it lowercase and the password I'm going to copy it from.
My username and password file, although it's actually easy to remember, is this, so this will now
authenticate the subscriber to the rest of the comment line is identical to what we used in previous
lecture.
So I'm just going to copy and paste it straight in.
So that gives us our subscriber.
We're going to do the same thing for the publisher now.
So that's Mosquito.
Pub.
I'm going to use the same username or password, although I could use something else.
Actually, I will use something else.
Let's say that this is coming from the ISP 32.
So the ISP 30 to username is expected to.
And for the password.
Is this.
And I'm going to copy the rest, which is the topic and the message that we want to pass through.
You made a typo.
That's why they should be doing more copying.
So let's fix that.
I need to put in Ohio.
There you go.
So the message came through and it was communicated between two authenticated clients.
I'm going to do the same thing in my inbox.
The first thing I need to change the configuration of the client here and I need to insert the username
and password.
And to do that, I am going to copy the credentials.
And let's say that I want to use the note read credentials as the user and the password for that user
is this and that's about it.
I don't need to make any other changes.
I will save the new client and he can see it's already connected.
And I'm going to subscribe to the text version, first test topic.
And let's sent another message to these.
Topic had a world again.
Perfect, it works and I'm going to click on Subscribe here and say hello from Katie Fox.
Gurney comes through both subscriber's.
All right, so now we've got mosquito broker set up on our Raspberry Pi.
It does require claims to be authenticated before they can subscribe or publish anything.
The next thing to do is to go into no dread and have a look at how we can use the quiddity.
Broca from within Modred.
So we do that in the next section.