Implementing Token and Role Base Authentication Using Spring Boot + JWT+ MySQL

preview_player
Показать описание
Let's understand, how to implement token and role base authentication mechanism using spring security, jwt and mysql database. In this session, we are going to build a real time application to perform jwt token and role based authentication mechanism.

In this session, I have discussed following points.
1. What is authentication and authorization in an application?
2. How to implement token and role base authentication

For the people looking for time lines in the tutorial:
0:00 App walkthrough
8:24 App flow and tools used
10:24 Project creation
17:21 Creating DB
22:50 Package structuring
24:13 Creating entity - Role
26:40 Creating RoleController
29:00 Creating RoleService
29:58 Creating RoleDao
41:56 Creating entity - User
48:54 Creating UserController
50:00 Creating UserService
50:51 Creating UserDao
58:03 init method for DB data
1:14:00 Creating forAdmin and forUser endpoint in UserController
1:18:53 Configuring Spring boot project to enable JWT and spring security
1:19:43 Global Cors configuration
1:24:42 Creating JwtAuthenticationEntryPoint class
1:27:05 Creating WebSecurityConfigurer class
1:46:52 Implementing JwtRequestFilter
1:52:04 Creating Utility to fetch from Jwt Token
2:18:23 Creating JwtController, JwtRequest and JwtResponse entity
2:45:41 Password encryption
2:51:57 Testing the application

Disclaimer - The music/audio used(if any) in this video is not a property of "Learn Programming Yourself". All credit goes to owners of respective music/audio. This music/audio is not prone to any "Copyright Strikes".

#springsecurity #jwt #authentication #authorization

------------------------------------------------------------------------------------------
Here're links to git repo
1. jwt-youtube (Spring Boot)

2. jwt-youtube-ui (Angular)

---------- Links to my other FREE courses. ----------
Рекомендации по теме
Комментарии
Автор

The idea of putting app walkthrough first was a good one, 'cause then I knew what are you going to make, so I could follow better the process of creating this all. Thank you!

dalilapramenkovic
Автор

Find best spring security tutorial over youtube.
Awesome explanation method, help me a lot.
Thanks

DeepakKumar-oczl
Автор

I have not gone through the tutorial but your intro, people's comments, and you replying comments give me confidence, I'll edit this comment after going through it.

charitysimon-peraboh
Автор

It is the best video for authentication and role based authorization.Thank you so much.

kumarakash
Автор

your teaching style is really an amazing

KamalKumar-mcbh
Автор

Thank you so much sir I hats off your efforts for explaining each and every line of code for JWT 🙏🙏🙏🙏.

RohitKumar-dzdh
Автор

I wish I had such a wonderful Tutor like you ....

anushgm
Автор

For the people looking for time lines in the tutorial:
0:00 App walkthrough
8:24 App flow and tools used
10:24 Project creation
13:30 Dependencies and pom.xml
16:24 Setting up application.properties
17:21 Creating DB
20:15 Back to setting up application.properties
22:50 Package structuring
24:13 Creating entity - Role
26:40 Creating RoleController
29:00 Creating RoleService
29:58 Creating RoleDao
41:56 Creating entity - User
48:54 Creating UserController
50:00 Creating UserService
50:51 Creating UserDao
58:03 init method for DB data
1:14:00 Creating forAdmin and forUser endpoint in UserController
1:17:44 Adding JWT and Spring security dependency in pom.xml
1:18:53 Configuring Spring boot project to enable JWT and spring security
1:19:43 Global Cors configuration
1:24:42 Creating JwtAuthenticationEntryPoint class
1:27:05 Creating WebSecurityConfigurer class
1:46:52 Implementing JwtRequestFilter
1:52:04 Creating Utility to fetch from Jwt Token
2:18:23 Creating JwtController, JwtRequest and JwtResponse entity
2:45:41 Password encryption
2:51:57 Testing the application
Some part may be missing as the tutorial was jumping from section to section but it is still the best tutorial out there. So thanks a lot brother for this.
PS: Can you please include this in your video description (Or update this according to your understanding) because this comment will definitely go at the bottom after some time as more users will comment?

anirudhnanwal
Автор

Hello I am French and my English is not very good but I understood and everything you explain is clear really very good job THANK YOU

Zoxxxyde
Автор

Mannn, can't thank you enough. I watched the whole tutorial once. and then code along in 2nd go and I can definitely say I know a lot more about Spring Security now. Just wanted to add a point that at some points you just used the methods where you could have explained why you did that and what it actually does. Just a feedback from a general viewer what exactly we look for. Thanks a ton for this, I am sure it would have taken hours of research and hands on to come up with such an extensive content.

saurabhkannawar
Автор

The best Spring JWT I have seen so far.

mangalanimangalani
Автор

Awesome Tutorial ⭐ ... Really helped me in understanding spring security

shubhamjadhav
Автор

Just subscribed, you derseve it your tutorial is top notch!, will ask questions when i find difficulty am still following it the full 3 hours!

marypaul
Автор

Thanks so much for your excellent explanations and tutorial. The Jwt did get very heavy and confusing, and really appreciated you discussing best practice security when developing the app. Great job!.

philjohnston
Автор

Thank you bro. This is very helpful video. Greetings from Turkey.

emree
Автор

Thank you so much for this insightful session.

priyagade
Автор

Brilliant work brother. It was very helpful. Thank you so much

abhishekbirkodi
Автор

so far the best tutorial that talks about this topic in youtube, may god bless you, just one thing you should update the course to be compatible with spring boot 3 or higher because spring doesn't implement anymore WebSecurityConfigurerAdapter and other springsecurity methods ...good luck man wish you all the best

mohamedmedna
Автор

Awesome video just what I was looking for thanks a lot

uchiha_mishal
Автор

Awesome explanation....Thanks a lot..Really helped me to SpringSecurity

kasaiahv