▶️ JWT Logout: • JWT Logout: The Trick You Missed in S...
▶️ Refresh Token: • Implementing Secure Refresh Tokens in...
👉 Master programming by recreating your favorite technologies: https://app.codecrafters.io/join?via=...
In this tutorial, we'll walk you through the seamless integration of JWT (JSON Web Tokens) authentication and authorization into your Spring Boot application using Spring Security and JJWT
✅For branding and Business inquiries ► [email protected]
📘 Resources Mentioned:
🧑💻 Source Code: https://github.com/hello-iftekhar/spr...
⛔ Background sound: https://share.epidemicsound.com/ia954g
🤚 In case you want to contact me:
❌ My LinkedIn profile: / iftekhar-hossain-369bbb6a
❌ Github: https://github.com/learnwithiftekhar
❌ My Fiverr profile: https://www.fiverr.com/ifte_hsn
I also provide service on Upwork. In case you are interested:
❌ https://www.upwork.com/freelancers/~0...
Note: Some of the links in this description are affiliate links, and I may earn a small commission if you make a purchase through them. Thank you for your support.
Contents:
00:00 Intro
00:14 What are we going to cover
00:55 What is JWT
01:09 JWT like digital passport
01:22 JWT is like Sandwitch
01:35 JWT example
01:38 Header of JWT Token
01:45 JWT Payload
01:59 JWT Signature
02:46 Initialize new Spring Boot Application
03:41 Adding Dependency
05:03 Connecting to database using IntelliJ IDE built-in tool
7:31 Renaming application.properties file
07:46 Configuring Spring Boot for database connection
11:43 Creating user class
15:32 Adding Role class
16:05 Creating Role Class
19:09 Creating UserRepository
23:27 Explanation of Access Modifiers
24:00 Java's Default Access Modifier
27:22 UserDetailsService Implementation
29:45 Add jjwt dependencies in the project
32:05 Creating JwtService
33:42 Generate the token
36:16 Extract Payload/Claim from the token
38:04 Extract username from claim
38:34 Validate the token
40:04 Check if the token is expired
40:55 Creating JWT Filter
47:53 Configuring Spring Security
52:02 Creating AuthenticationController
52:40 Creating AuthenticatinService
59:05 Testing the application