1 00:00:00,210 --> 00:00:07,310 In this video, let's try to look into how spring security internally handles authorisation and authentication. 2 00:00:07,470 --> 00:00:14,640 So in industry, we call authentication in the short form with art and and authorization with the form. 3 00:00:15,810 --> 00:00:19,870 So that's a heading that I would use to make you aware of it. 4 00:00:20,310 --> 00:00:24,960 So coming to the Point Home Springs Security internally handles exactly. 5 00:00:25,230 --> 00:00:29,430 An underwater authorization is an optional step in any application. 6 00:00:29,430 --> 00:00:35,400 Like there are a good number of applications where they just want to authenticate the person or authenticate 7 00:00:35,400 --> 00:00:35,890 the user. 8 00:00:35,940 --> 00:00:40,920 They don't have a complex requirements like they want to control the actions or pages, display the 9 00:00:40,920 --> 00:00:44,820 data based upon the user access and roles in such scenarios. 10 00:00:45,150 --> 00:00:47,000 They will go with only authentication. 11 00:00:47,160 --> 00:00:55,260 But majority of the applications, particularly if your application having thousands of users, then 12 00:00:55,260 --> 00:01:02,340 obviously there's a good chance that you may have a requirement to control the user actions and display 13 00:01:02,340 --> 00:01:05,459 of the data based upon the rules and authorities. 14 00:01:05,480 --> 00:01:10,530 So in such scenarios only, we configure authorization inside the Springsure. 15 00:01:11,160 --> 00:01:18,900 As we know from previous sections, all the user related contract contracting schema is stored inside 16 00:01:18,900 --> 00:01:20,150 user details. 17 00:01:20,160 --> 00:01:26,730 So that's what will happen as soon as a user interface credentials authentication filter will intercept 18 00:01:26,730 --> 00:01:27,510 the request. 19 00:01:27,510 --> 00:01:33,810 And it will call the method like law user by user name and try to validate it with the credentials are 20 00:01:33,810 --> 00:01:34,560 correct or not. 21 00:01:34,590 --> 00:01:42,090 If the credentials are correct, all the user details excluding password will be stored in the user 22 00:01:42,090 --> 00:01:49,350 detailed keema implementation and it will be stored inside the security context once it is stored inside 23 00:01:49,350 --> 00:01:50,580 the security context. 24 00:01:50,730 --> 00:01:57,580 And if you have configured authorization inside your framework, we will see how to configure authorization, 25 00:01:57,600 --> 00:01:58,650 the coming videos. 26 00:01:58,950 --> 00:02:06,270 But for now, assume if you configure our transition inside, our application authorization filter also 27 00:02:06,270 --> 00:02:12,110 will come into picture and it will try to load the user details from the security context. 28 00:02:12,120 --> 00:02:18,450 And when I say user details, along with his name and email and all other details, it will also load 29 00:02:18,690 --> 00:02:24,240 authorities are rules that user associated based upon those values. 30 00:02:24,420 --> 00:02:30,570 It will try to compare whether this particular user has access to perform this action or not. 31 00:02:30,600 --> 00:02:40,170 Only if he has access, then it will allow the business execution to the associated Apapa that you are 32 00:02:40,170 --> 00:02:46,680 like in the scenarios we have bots like admin dashboard and based upon the rules that we configure, 33 00:02:46,860 --> 00:02:50,630 the authorization filter will allow them to execute further. 34 00:02:50,760 --> 00:02:55,440 Otherwise it will throw an error for the two, three, four billion error we have discussed on a high 35 00:02:55,440 --> 00:02:55,770 level. 36 00:02:55,770 --> 00:03:00,330 Hotspring security handles transition scenarios in the next video. 37 00:03:00,510 --> 00:03:08,640 Let's try to understand where exactly this authorization details like Rolt authorities will be stored 38 00:03:08,640 --> 00:03:10,940 inside the user detailed schema. 39 00:03:11,190 --> 00:03:11,730 Thank you. 40 00:03:11,730 --> 00:03:12,110 And by.