1
00:00:00,240 --> 00:00:00,870
Hey guys.

2
00:00:00,870 --> 00:00:03,020
So welcome to this new video.

3
00:00:03,060 --> 00:00:09,420
Exciting times ahead we're going to be looking at authentication and user authentication in our school

4
00:00:09,420 --> 00:00:11,070
management system.

5
00:00:11,080 --> 00:00:17,410
Now up to this point we've been looking at how we'd go about creating content putting our database how

6
00:00:17,490 --> 00:00:23,650
creating courses students what we haven't really looked at controlling who can do what.

7
00:00:23,730 --> 00:00:30,360
And that's why user authentication is really all about putting in that one need to register and to log

8
00:00:30,360 --> 00:00:37,830
in mechanism and restricting access based on if you're registered versus if you're not registered what

9
00:00:37,830 --> 00:00:40,630
can you access if you are registered those kind of things.

10
00:00:40,710 --> 00:00:45,840
And that is where we want to start off to date from the very beginning of this tutorial you would have

11
00:00:45,840 --> 00:00:51,150
noticed in the top right hand corner of our enough bar that we had a register button and we had a log

12
00:00:51,150 --> 00:00:51,890
in button.

13
00:00:51,930 --> 00:00:57,450
Those have been there the entire time I haven't clicked on them open to this very video and we will

14
00:00:57,450 --> 00:01:00,670
actually see what happens.

15
00:01:00,690 --> 00:01:08,030
Now it's noteworthy that this would have been generated for you from the get go.

16
00:01:08,160 --> 00:01:11,160
And when I say the get go I mean when you are creating the projects.

17
00:01:11,160 --> 00:01:15,870
There was an option there that asked you what kind of authentication you want.

18
00:01:15,960 --> 00:01:19,260
And it had something for individual accounts and such and so forth.

19
00:01:19,260 --> 00:01:25,040
We'll get into that bring you back through those steps so you can reacquaint yourself with those options.

20
00:01:25,110 --> 00:01:29,630
How do you select a no authentication then no work would have been done before hand.

21
00:01:29,760 --> 00:01:34,530
Have you selected individual icons at the very least which is what I did you would would have gotten

22
00:01:34,950 --> 00:01:41,520
these buttons as well as some auto generated code that would have been in the whole project template

23
00:01:41,550 --> 00:01:43,850
as you would have seen it from the start.

24
00:01:43,860 --> 00:01:51,000
So to begin we're going to walk through visual studio just create a mock project and you will get to

25
00:01:51,000 --> 00:01:53,580
see the exact options that I was referring to.

26
00:01:54,060 --> 00:01:56,550
So here we have visual studio once again.

27
00:01:56,640 --> 00:02:01,710
And this should be an all too familiar page once you open a Visual Studio you are rooted to this start

28
00:02:01,710 --> 00:02:04,920
page where they want to know do you want a project et cetera et cetera.

29
00:02:05,100 --> 00:02:11,910
We can just go to a new project create new project select web application I'm not going to give it a

30
00:02:11,910 --> 00:02:16,860
specific name because I'm not really going to create one I just want to show you what I was talking

31
00:02:16,860 --> 00:02:24,390
about when you select MVC and then to the right you see that you can change authentication so authentication

32
00:02:24,390 --> 00:02:31,710
right knows no to no authentication meaning because the last project I did I created it without authentication.

33
00:02:32,040 --> 00:02:37,260
There are ways to get authentication in you'd have to get some identity libraries and do some manual

34
00:02:37,260 --> 00:02:45,630
work yourself but then you can always change authentication from the creation point and then click individual

35
00:02:45,630 --> 00:02:46,560
user accounts.

36
00:02:46,590 --> 00:02:52,020
So you do have work or school accounts which would link it to look at any of Windows authentication

37
00:02:52,380 --> 00:02:57,170
which would probably use like ended up for a more intricate internal kind of setting.

38
00:02:57,240 --> 00:03:02,190
Well then we would want to use individual user accounts because we we're not necessarily sure who will

39
00:03:02,190 --> 00:03:03,030
be accessing.

40
00:03:03,030 --> 00:03:09,690
So I guess based on the nature of your project you can use individual or you can use ended up but for

41
00:03:09,690 --> 00:03:15,510
this purpose on when to use the individual user accounts and if you read the description they say for

42
00:03:15,510 --> 00:03:22,050
applications that stories or profiles in a sequel database and it also allows users to register using

43
00:03:22,050 --> 00:03:25,730
existing icons for social media platforms.

44
00:03:25,740 --> 00:03:30,240
All right so it actually generates all of that code and those interfaces and you just go in and plug

45
00:03:30,240 --> 00:03:35,910
in whatever is required of you accordingly so you can just select individual user accounts.

46
00:03:35,940 --> 00:03:36,890
Okay.

47
00:03:36,900 --> 00:03:42,950
And then when you click okay the project would then be prepared as we know.

48
00:03:43,320 --> 00:03:48,980
So back to our projects where from the get go we actually selected individual user accounts.

49
00:03:49,140 --> 00:03:53,520
We would be able to run our register and run a log in.

50
00:03:53,520 --> 00:03:58,420
So I'm just going to walk quickly through the register and show you how the code works.

51
00:03:58,440 --> 00:04:05,100
This is strictly out of the box I have not made any modifications and we can put in an e-mail address

52
00:04:05,550 --> 00:04:10,250
I can see and I see I already have one here and I can use a password.

53
00:04:10,260 --> 00:04:15,390
Google is suggesting a very complicated one to me I just use that and then I click register

54
00:04:18,030 --> 00:04:23,210
and there we go where relative to the home page where we know see clearly displayed a hello.

55
00:04:23,310 --> 00:04:31,860
That email that I just entered and it's giving me the ability to log off so I can click log off and

56
00:04:31,860 --> 00:04:37,740
then I'm went to try and log in with those exact credentials and ask Google to see if those credentials

57
00:04:37,770 --> 00:04:42,210
because you know the the password was a bit complicated to remember.

58
00:04:42,240 --> 00:04:43,790
So I ask Google to save it.

59
00:04:43,950 --> 00:04:46,490
And you see all of these screens are register screen.

60
00:04:46,500 --> 00:04:51,810
This log in screen all of those came out of the box with the individual user accounts.

61
00:04:51,900 --> 00:04:54,690
User identity registration engine.

62
00:04:54,690 --> 00:05:02,820
So I can just click log in right here and you'll see that I know a row to the right back to that home

63
00:05:02,820 --> 00:05:04,770
page where I am no logged in.

64
00:05:05,160 --> 00:05:05,520
All right.

65
00:05:05,880 --> 00:05:09,810
So in this tutorial we're going to take a tour of this whole engine.

66
00:05:09,810 --> 00:05:13,960
All of the code that would have been generated if you want to add more fields.

67
00:05:13,980 --> 00:05:15,720
What do we need to modify.

68
00:05:15,900 --> 00:05:22,260
And we will get into how we can go about customizing this to our own needs.
