1
00:00:00,690 --> 00:00:06,570
Now that we have configured the mosquito, A, to require authentication from its clients, let's go

2
00:00:06,570 --> 00:00:15,080
and repeat the examples that you looked at a couple of years ago and create subscribers and publishers

3
00:00:15,120 --> 00:00:17,440
that authenticate themselves to the broker.

4
00:00:17,790 --> 00:00:26,040
So I'm going to do this first on the command line and then on the embedded ebooks client in the documentation

5
00:00:26,040 --> 00:00:29,600
for mosquito publisher and subscriber.

6
00:00:29,940 --> 00:00:39,750
We learned that we use the EU switch the way you switch to pass on the user name and the capital P,

7
00:00:39,750 --> 00:00:41,220
which should be somewhere here.

8
00:00:43,620 --> 00:00:51,010
Think the capital P or minus minus pay W for the password, so that's what we are going to use first.

9
00:00:51,030 --> 00:00:59,220
I'm going to create a subscriber and that is mosquito sub.

10
00:00:59,730 --> 00:01:03,230
And the user name is Peter.

11
00:01:03,240 --> 00:01:09,300
I keep it lowercase and the password I'm going to copy it from.

12
00:01:11,560 --> 00:01:19,150
My username and password file, although it's actually easy to remember, is this, so this will now

13
00:01:19,160 --> 00:01:26,140
authenticate the subscriber to the rest of the comment line is identical to what we used in previous

14
00:01:26,140 --> 00:01:26,660
lecture.

15
00:01:27,250 --> 00:01:30,040
So I'm just going to copy and paste it straight in.

16
00:01:30,430 --> 00:01:33,200
So that gives us our subscriber.

17
00:01:33,640 --> 00:01:36,870
We're going to do the same thing for the publisher now.

18
00:01:37,150 --> 00:01:39,100
So that's Mosquito.

19
00:01:40,710 --> 00:01:41,220
Pub.

20
00:01:41,790 --> 00:01:46,550
I'm going to use the same username or password, although I could use something else.

21
00:01:46,680 --> 00:01:48,190
Actually, I will use something else.

22
00:01:48,210 --> 00:01:50,880
Let's say that this is coming from the ISP 32.

23
00:01:51,390 --> 00:01:58,980
So the ISP 30 to username is expected to.

24
00:02:01,990 --> 00:02:03,580
And for the password.

25
00:02:07,970 --> 00:02:08,710
Is this.

26
00:02:10,160 --> 00:02:16,850
And I'm going to copy the rest, which is the topic and the message that we want to pass through.

27
00:02:18,640 --> 00:02:19,870
You made a typo.

28
00:02:20,740 --> 00:02:22,420
That's why they should be doing more copying.

29
00:02:23,380 --> 00:02:24,620
So let's fix that.

30
00:02:24,640 --> 00:02:25,900
I need to put in Ohio.

31
00:02:28,320 --> 00:02:28,820
There you go.

32
00:02:28,890 --> 00:02:35,100
So the message came through and it was communicated between two authenticated clients.

33
00:02:35,130 --> 00:02:38,240
I'm going to do the same thing in my inbox.

34
00:02:39,660 --> 00:02:45,330
The first thing I need to change the configuration of the client here and I need to insert the username

35
00:02:45,330 --> 00:02:46,590
and password.

36
00:02:47,130 --> 00:02:51,720
And to do that, I am going to copy the credentials.

37
00:02:51,720 --> 00:03:00,930
And let's say that I want to use the note read credentials as the user and the password for that user

38
00:03:00,930 --> 00:03:03,640
is this and that's about it.

39
00:03:03,810 --> 00:03:05,700
I don't need to make any other changes.

40
00:03:05,700 --> 00:03:09,660
I will save the new client and he can see it's already connected.

41
00:03:10,230 --> 00:03:17,880
And I'm going to subscribe to the text version, first test topic.

42
00:03:17,880 --> 00:03:21,210
And let's sent another message to these.

43
00:03:22,540 --> 00:03:24,550
Topic had a world again.

44
00:03:27,260 --> 00:03:37,460
Perfect, it works and I'm going to click on Subscribe here and say hello from Katie Fox.

45
00:03:39,820 --> 00:03:43,140
Gurney comes through both subscriber's.

46
00:03:44,780 --> 00:03:50,340
All right, so now we've got mosquito broker set up on our Raspberry Pi.

47
00:03:50,360 --> 00:03:56,240
It does require claims to be authenticated before they can subscribe or publish anything.

48
00:03:56,630 --> 00:04:04,700
The next thing to do is to go into no dread and have a look at how we can use the quiddity.

49
00:04:04,700 --> 00:04:07,160
Broca from within Modred.

50
00:04:07,490 --> 00:04:09,380
So we do that in the next section.
