JWT Logout: • JWT Logout: The Trick ...
Refresh Token: • Implementing Secure Re...
Welcome to our tutorial where 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.
In this step-by-step guide, we'll cover everything you need to know to implement JWT-based security, ensuring your application's data and endpoints are protected with industry-standard authentication and authorization techniques. Whether you're new to Spring Security or looking to enhance your skills, this tutorial is perfect for developers of all levels.
By the end of this video, you'll have a solid understanding of how to set up JWT authentication and authorization in your Spring Boot project, empowering you to build secure and robust applications with ease.
Don't forget to like, share, and subscribe for more insightful tutorials on Spring Boot development! Let's dive in and unlock the power of JWT security with Spring Security and JJWT.
📘 Resources Mentioned:
🧑💻 Source Code: github.com/hello-iftekhar/spr...
⛔ Background sound: share.epidemicsound.com/ia954g
🤚 In case you want to contact me:
❌ My LinkedIn profile: / iftekhar-hossain-369bbb6a
❌ Github: github.com/hello-iftekhar
❌ My Fiverr profile: www.fiverr.com/ifte_hsn
I also provide service on Upwork. In case you are interested:
❌ www.upwork.com/freelancers/~0...
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
2 июн 2024