1
00:00:00,150 --> 00:00:01,710
Hello, friend, welcome back.

2
00:00:02,100 --> 00:00:08,250
In a previous video, we have created one of the function as a user, a function, and also we import

3
00:00:08,250 --> 00:00:15,060
our all that glass function as authenticate function logging and the logout that is our EDP in response

4
00:00:15,060 --> 00:00:17,910
to that and locking the Guard and Reserve.

5
00:00:18,360 --> 00:00:21,730
So now we step by step, we will use all that our diskless function.

6
00:00:22,050 --> 00:00:27,510
So here, first of all, I want to do want to check out these two of these field that username and password

7
00:00:27,510 --> 00:00:33,130
feel is authenticated or not, so we can check it with our diskless function authenticate.

8
00:00:33,130 --> 00:00:34,580
So with this we can actually check it.

9
00:00:34,590 --> 00:00:39,840
So I show you like here I want to do I want to define one of the variable as a user.

10
00:00:39,840 --> 00:00:46,520
And then if this user area I want to define this authenticate, that means with this our class function.

11
00:00:47,010 --> 00:00:48,270
So it this class function.

12
00:00:48,270 --> 00:00:50,220
I want to check out to this field.

13
00:00:50,220 --> 00:00:55,200
So one will be as a user user name is match with our user name.

14
00:00:56,510 --> 00:01:03,060
OK, it means actually this user name, if you go to our database into the database they have also on

15
00:01:03,210 --> 00:01:05,520
the database they will field as the user name.

16
00:01:05,520 --> 00:01:05,820
Right.

17
00:01:06,030 --> 00:01:08,550
And also to have another field as a password.

18
00:01:08,820 --> 00:01:10,270
So I don't want to check it.

19
00:01:10,290 --> 00:01:14,310
So this user is appropriately matched with our these user field or not.

20
00:01:14,310 --> 00:01:16,500
And also same as for our password.

21
00:01:16,680 --> 00:01:19,470
OK, so now I don't want to actually defining it.

22
00:01:19,480 --> 00:01:26,150
So our this user that is our database table feel users match with our logging e-mail input field.

23
00:01:26,160 --> 00:01:30,090
So here I have already defined our input field as a user name, as a password.

24
00:01:30,090 --> 00:01:30,380
Right.

25
00:01:30,720 --> 00:01:35,900
So that the two of the things we have to match so here are define as user name is match or not.

26
00:01:36,180 --> 00:01:39,600
And also I have to define the same things as for the password.

27
00:01:40,050 --> 00:01:42,540
So so we match with our password or not.

28
00:01:42,810 --> 00:01:48,660
So that means if our user name is appropriate, if our password is appropriate, that means this user

29
00:01:48,660 --> 00:01:49,890
is authenticated.

30
00:01:49,890 --> 00:01:50,170
Right.

31
00:01:50,460 --> 00:01:55,740
So now I'm going to want to take on the condition if this user so I take all that our authenticated

32
00:01:55,740 --> 00:01:58,770
user and I just take the things with this variable as a user.

33
00:01:59,250 --> 00:02:05,490
So I just simply defined as a user, OK, that is, if this authenticated user that this user is already

34
00:02:05,490 --> 00:02:06,120
logged in.

35
00:02:06,420 --> 00:02:10,200
And here after that, I want to check this user is active or not.

36
00:02:10,230 --> 00:02:15,840
OK, so if you want to check it, I just put another condition as our if into the if condition with

37
00:02:15,840 --> 00:02:16,530
this user.

38
00:02:16,530 --> 00:02:20,790
That means these authenticated user is is active or not.

39
00:02:20,830 --> 00:02:23,190
So I just simply find another function as active.

40
00:02:25,220 --> 00:02:26,850
So I just simply defined as active.

41
00:02:27,410 --> 00:02:31,280
So with this, I will check our results indicate that the user is active or not.

42
00:02:31,460 --> 00:02:37,400
So if this user is active, then I want to do and define one of the another function.

43
00:02:37,400 --> 00:02:38,840
I want to define another function of the.

44
00:02:39,980 --> 00:02:45,580
OK, that means this logging user then I don't want to pass it to our authenticated user.

45
00:02:45,590 --> 00:02:47,710
That means here our authenticated user.

46
00:02:47,720 --> 00:02:54,680
I take that this one that means our this user is authenticated and also these user is active.

47
00:02:54,920 --> 00:02:57,620
OK, so here I just simply pass that request.

48
00:02:57,950 --> 00:02:58,170
Right.

49
00:02:58,790 --> 00:03:00,550
I hope you can all understand about it.

50
00:03:00,560 --> 00:03:07,370
So when this user is authenticated and when this user is active, they know what to do and to pass on

51
00:03:07,410 --> 00:03:08,000
the piece.

52
00:03:08,270 --> 00:03:15,260
That means this user after this I want to do in the past that we've done so here I define as written

53
00:03:15,800 --> 00:03:24,310
and then here I want to do and to access that SCDP as TDP sorry, SCDP response to that.

54
00:03:24,680 --> 00:03:28,000
So now I want to use this function to why I am using it.

55
00:03:28,010 --> 00:03:28,840
I will show you.

56
00:03:28,850 --> 00:03:33,080
So then it'll be very much clear to who I am actually using that SCDP response to it.

57
00:03:33,590 --> 00:03:40,510
So now I just simply defined as the EDP response to that and then I want to do and define as a reserve.

58
00:03:40,940 --> 00:03:44,120
So that is actually also another function as it is diverse.

59
00:03:44,420 --> 00:03:46,730
So I guess I really find the reverse.

60
00:03:46,880 --> 00:03:51,740
And with this reverse, I want to do the past this user to one of the base.

61
00:03:51,750 --> 00:03:56,720
That means when this user will be approved, appropriate username and password.

62
00:03:56,720 --> 00:03:58,730
After that, it should be elected to our homepage.

63
00:03:58,760 --> 00:04:01,940
OK, so that means you should be redirected to our displays.

64
00:04:02,270 --> 00:04:04,690
So for the homepage, I have already defined all of that.

65
00:04:04,700 --> 00:04:05,800
You all right.

66
00:04:05,810 --> 00:04:07,760
So I have already defined the what else?

67
00:04:07,790 --> 00:04:08,430
Our home page.

68
00:04:08,450 --> 00:04:08,990
What a name.

69
00:04:08,990 --> 00:04:10,850
I have defined that things with the index.

70
00:04:11,120 --> 00:04:13,250
So that is our apt name as a locking up.

71
00:04:13,880 --> 00:04:20,300
So now in particular, that position I define our happening fast as a locking up and then I want to

72
00:04:20,300 --> 00:04:21,950
pass it on our index.

73
00:04:22,250 --> 00:04:25,570
But like a friend, I hope you can well understand about it.

74
00:04:25,580 --> 00:04:28,370
So when this user will be as I indicated.

75
00:04:28,370 --> 00:04:33,950
So I just take that things which is authenticated and also objective user is active or not within this

76
00:04:33,950 --> 00:04:34,760
user is active.

77
00:04:34,760 --> 00:04:36,880
Then I just passed that request to the user.

78
00:04:36,890 --> 00:04:41,270
That means that means this user is totally authenticated that this user is true.

79
00:04:41,540 --> 00:04:46,320
And then when it will be true, I just simply return to the one of the base.

80
00:04:46,670 --> 00:04:53,660
So here with SCDP response and with this redact, I reverse our dis user to our locking index page.

81
00:04:53,660 --> 00:04:57,830
That means it should be redirected to our index based right and elds.

82
00:04:57,830 --> 00:05:01,830
So else what exactly should we do that means when this user is not active.

83
00:05:02,090 --> 00:05:09,470
So that here we have to defining it, say to somebody else, OK, that means if this user is not authenticated,

84
00:05:09,470 --> 00:05:14,990
that means this user pulls out inappropriate user name or the inappropriate password, then what exactly

85
00:05:14,990 --> 00:05:15,740
should be looked at?

86
00:05:16,040 --> 00:05:21,530
So here I want to do want to define then send the message so into the Ayles condition.

87
00:05:21,530 --> 00:05:25,130
I define the return and then SCDP response.

88
00:05:25,730 --> 00:05:31,960
So they have also the city response function with this response function and the source of the message.

89
00:05:31,970 --> 00:05:34,670
So here it shall be shown on the message as an account.

90
00:05:35,600 --> 00:05:38,400
OK, account is not active.

91
00:05:39,350 --> 00:05:43,790
So this type of message is a display and else that means going on.

92
00:05:43,790 --> 00:05:51,020
What total portion is in total person who will be as a fault then what exactly you want to do here?

93
00:05:51,020 --> 00:05:58,310
Also on display on another message so far the results in the LS here are different other URLs and here

94
00:05:58,310 --> 00:06:00,860
I simply define this as TDP response.

95
00:06:01,550 --> 00:06:02,180
Sorry.

96
00:06:03,650 --> 00:06:05,240
So this has to be response.

97
00:06:05,240 --> 00:06:07,490
I want to do on the display some of the message.

98
00:06:08,000 --> 00:06:15,530
So here and this is the message as a login detail like login details are wrong.

99
00:06:16,820 --> 00:06:22,490
So this step up, one of the messages we display and also after that I want to take another Ale's.

100
00:06:23,090 --> 00:06:29,960
I take another is because of like now you can see if you go to our Etoile into the URL I have already

101
00:06:29,960 --> 00:06:32,390
defined on the part as a user logging.

102
00:06:32,690 --> 00:06:38,960
So when this user is how the user is directly accessed, this part, that means here, if you go here,

103
00:06:39,230 --> 00:06:44,020
some of the user, if you go in particular these bacteria, then what exactly to be elected.

104
00:06:44,030 --> 00:06:44,350
Right.

105
00:06:44,630 --> 00:06:47,300
So here also we have to protect each of the regions here.

106
00:06:47,300 --> 00:06:50,090
We have to do we have to define another Ayles.

107
00:06:50,630 --> 00:06:55,730
So into this area that we saw in this user will be allowed to directly access this function.

108
00:06:55,760 --> 00:07:01,760
That means this is well, then I want to do and define as ls it will be written so that another piece

109
00:07:01,760 --> 00:07:04,030
is to be done to our actual logging base.

110
00:07:04,790 --> 00:07:08,850
So I just simply return and then our endor.

111
00:07:09,920 --> 00:07:16,820
So with this sender, I want to pass on the request and then I want to do undeposited, this user when

112
00:07:17,000 --> 00:07:19,580
we access this function that should be accessed.

113
00:07:19,580 --> 00:07:24,410
These are despite this user I want to do and redacted to our this logging.

114
00:07:24,790 --> 00:07:31,750
OK, so that is in our locking up, so here we have to define it, the locking up and then our base

115
00:07:31,750 --> 00:07:33,070
as a locking door.

116
00:07:34,090 --> 00:07:34,420
Right.

117
00:07:34,750 --> 00:07:37,660
I hope you can understand about it enough that I have to do.

118
00:07:37,660 --> 00:07:38,920
I have to defend that contest.

119
00:07:39,730 --> 00:07:41,560
So I just simply defend that context.

120
00:07:41,560 --> 00:07:46,210
And right now, I didn't defend anything for the reasons I just make the things as a blank.

121
00:07:46,360 --> 00:07:48,220
So that's all you have to do.

122
00:07:48,220 --> 00:07:50,790
I hope, friend, you can well understand about it.

123
00:07:50,800 --> 00:07:53,160
So here I have defined our all that feel.

124
00:07:53,170 --> 00:07:59,380
And then I also indicated to of this field if I was to follow through with it, I just put that condition.

125
00:07:59,630 --> 00:08:04,570
So if this user is authenticated and also I define another condition, is the user.

126
00:08:04,570 --> 00:08:05,110
Exactly.

127
00:08:05,110 --> 00:08:09,550
Will not see this user active need to be addicted to our index base.

128
00:08:09,820 --> 00:08:16,150
And this will be displayed as the account is not active and when our total option will be as false,

129
00:08:16,150 --> 00:08:19,570
then should be displayed as a steady response to disaster response.

130
00:08:19,570 --> 00:08:26,770
I display as a logging details are wrong rather than on this user will be direc access our user logging

131
00:08:26,770 --> 00:08:27,190
path.

132
00:08:27,430 --> 00:08:29,200
That means this function.

133
00:08:29,200 --> 00:08:32,520
Then for this one I simply define this user redacted.

134
00:08:32,530 --> 00:08:35,800
It should be the key to our logging as Tamalpais, that's all.

135
00:08:35,840 --> 00:08:37,750
OK, so that's all you have to do.

136
00:08:37,750 --> 00:08:38,800
Now let's check this out.

137
00:08:38,800 --> 00:08:42,700
If you click as I save all, I just click it to save all.

138
00:08:43,180 --> 00:08:44,700
First of all, I want to check it.

139
00:08:45,680 --> 00:08:47,550
Yeah, everything is running well now.

140
00:08:47,570 --> 00:08:53,850
Let's check this out, I just got to refresh so there is a lot going on here, in particular amenorrhea.

141
00:08:53,850 --> 00:08:56,930
I have already created that username as a kasie.

142
00:08:56,930 --> 00:09:01,060
And for the Karzi, I have defined the password as one, two, three, four, five.

143
00:09:01,100 --> 00:09:01,400
Right.

144
00:09:01,730 --> 00:09:05,150
So now I want to actually check it like I just simply defined as it causes.

145
00:09:05,930 --> 00:09:10,400
And then I define the password as a one, two, three, four or five.

146
00:09:10,670 --> 00:09:14,750
And if everything OK should be the key to our homepage right now, click the logging.

147
00:09:15,830 --> 00:09:22,400
Yes, now, considering our user is now successfully locked in for the results, you can see so perfectly

148
00:09:22,400 --> 00:09:27,370
rejected to our index base, so we successfully complete our logging portions.

149
00:09:27,380 --> 00:09:33,940
And now here, one thing I want to share with you, friend, like here I have used that SCDP response

150
00:09:34,100 --> 00:09:35,270
deck with the reserve.

151
00:09:35,270 --> 00:09:35,560
Right.

152
00:09:35,810 --> 00:09:37,770
So why I am actually using it.

153
00:09:37,780 --> 00:09:41,940
So if you don't want to use it, like I show you what exactly it will be happen.

154
00:09:42,290 --> 00:09:47,340
So right now, when it should be rejected now, because it's not perfectly rejected to a specific seawall.

155
00:09:47,530 --> 00:09:50,720
OK, but if you want to change it like here, I changed it.

156
00:09:51,020 --> 00:09:53,810
I just make up things as now as a node.

157
00:09:53,810 --> 00:09:58,460
And here I do find that things with another way sounded like this way.

158
00:09:58,700 --> 00:10:03,080
If you want to directly deck tattoos on the base, you can also reject it.

159
00:10:03,320 --> 00:10:03,800
Like here.

160
00:10:03,800 --> 00:10:08,060
I just simply defined as the written render request right into the request.

161
00:10:08,060 --> 00:10:13,710
If you want to pass that this user that is authenticated user when it will be authenticated, when it

162
00:10:13,710 --> 00:10:18,590
shall be as the active, if you want to pass this user to the specific logging base.

163
00:10:18,950 --> 00:10:24,100
That means our locking up with this locking up now on down ground defined as the index.

164
00:10:24,110 --> 00:10:24,360
Right.

165
00:10:24,710 --> 00:10:27,290
So now it shall be redacted or indexed status HTML.

166
00:10:28,010 --> 00:10:31,070
So I just simply disagree in this draft estimate.

167
00:10:31,430 --> 00:10:36,260
So if you want to parse this like that way and also there is a context I define as a make that into

168
00:10:36,260 --> 00:10:36,860
the blank.

169
00:10:37,050 --> 00:10:37,370
Right.

170
00:10:37,400 --> 00:10:42,170
So if you want to pass with this render request, then what exactly is to be happen?

171
00:10:42,410 --> 00:10:47,330
I show you like if you click the save all, I just get to save all.

172
00:10:47,900 --> 00:10:55,340
Now refresh this space, go to our logging and now onto logging with again as a Kasie and then I different

173
00:10:55,340 --> 00:10:56,000
the password.

174
00:10:56,000 --> 00:10:59,150
One, two, three, four, five knuckler because of logging.

175
00:10:59,930 --> 00:11:02,750
Now considering now we successfully logged in.

176
00:11:02,900 --> 00:11:08,260
But here you can see there is actually our warrell into the URL position now showing our this part.

177
00:11:08,270 --> 00:11:10,110
That means that user logging pop.

178
00:11:10,490 --> 00:11:16,490
So here I have already defined this condition when this you someone will be accessed, that user logging,

179
00:11:16,670 --> 00:11:18,790
it should be redirected to our index page.

180
00:11:18,800 --> 00:11:19,070
Right.

181
00:11:19,430 --> 00:11:21,220
So here I have already finding it.

182
00:11:21,230 --> 00:11:22,510
So that is our condition.

183
00:11:22,520 --> 00:11:25,130
I have defined that is really the cataloging piece.

184
00:11:25,130 --> 00:11:30,430
But here you can see now I'm actually already into this part, but it's not showing our index page,

185
00:11:30,500 --> 00:11:31,910
not that logging base.

186
00:11:31,910 --> 00:11:37,070
But here, if you refresh it after that refresh, you can see it's now redirected to a logging base

187
00:11:37,310 --> 00:11:39,140
and also for the logging base.

188
00:11:39,140 --> 00:11:45,140
I have defined all of the Anatoliy what I have, defining what I should be look like our logging, not

189
00:11:45,140 --> 00:11:46,250
that user logging.

190
00:11:46,460 --> 00:11:48,430
I hope you can well understand about it.

191
00:11:48,440 --> 00:11:52,840
So for preventing this for this, I am actually using this condition.

192
00:11:53,030 --> 00:11:58,550
So that is actually our one of the functions that is a class function as step response to that.

193
00:11:58,820 --> 00:12:04,160
So now I just make as a note and here I want to open it.

194
00:12:04,550 --> 00:12:08,840
So now I think it should be very much clear to you why I'm actually using this, OK.

195
00:12:08,860 --> 00:12:10,780
So with this, you can actually prevent it.

196
00:12:10,790 --> 00:12:16,370
So I just clear the save all and now go to the home now go to the logging.

197
00:12:16,790 --> 00:12:18,980
And now I just simply defend the Karzi.

198
00:12:19,460 --> 00:12:21,090
One, two, three, four, five.

199
00:12:21,130 --> 00:12:25,450
And now if you click on the logging now, you can see that now that is actually appropriate.

200
00:12:25,460 --> 00:12:27,030
You are that I actually want.

201
00:12:27,050 --> 00:12:31,100
So now they have no access for our this portion.

202
00:12:31,100 --> 00:12:36,290
That means this area that we use a logging's for what they use a logging I have already created on the

203
00:12:36,290 --> 00:12:36,750
part.

204
00:12:37,010 --> 00:12:42,140
So now if you use that part, because the enter now concedes no.

205
00:12:42,140 --> 00:12:48,200
Perfectly rejected to you that logging base and also that is a flower logging so perfectly it's not

206
00:12:48,200 --> 00:12:48,680
working.

207
00:12:48,920 --> 00:12:54,290
OK, friends, I hope you can understand about it what exactly the difference between two of these so

208
00:12:54,290 --> 00:12:55,200
you can use it.

209
00:12:55,220 --> 00:13:01,010
So with this our this function that is debate as posted, a function, you can you can prevent this.

210
00:13:01,010 --> 00:13:05,840
You are l a rather than if you pass that things like that where it will be work, but it should be actually

211
00:13:05,840 --> 00:13:07,940
added our another part.

212
00:13:07,940 --> 00:13:09,230
That means our user logging.

213
00:13:09,230 --> 00:13:13,160
But that is the part I have already defined in our you are right.

214
00:13:13,520 --> 00:13:19,940
So right now we will use all of these SCDP responses decks with this is to be response to that function.

215
00:13:19,940 --> 00:13:21,070
We can actually prevent it.

216
00:13:21,380 --> 00:13:26,570
I hope everything is now very much clear to you and we successfully now logged in.

217
00:13:26,720 --> 00:13:29,240
So now we have to also define our log out.

218
00:13:29,240 --> 00:13:34,700
And also here we want to define this step of one of the conditions when this user will be logged in

219
00:13:34,910 --> 00:13:41,240
our this register and the logging, if not, should be visible then only to be visible as a whole.

220
00:13:41,240 --> 00:13:47,500
And the log out and when you click on a log out, then our only that home or register will be visible.

221
00:13:47,840 --> 00:13:49,700
So we can do that step by step.

222
00:13:49,700 --> 00:13:53,770
I will show you the next video I to work for our log out portions.

223
00:13:53,810 --> 00:13:59,050
How can working with that log out in the next video, I will show you that things with the live example.

224
00:13:59,480 --> 00:14:01,000
So thanks for watching.

225
00:14:01,010 --> 00:14:02,870
I will see you in the next video.
