Secure spring boot application with JWT | Part 3

{getToc} $title={Table of Contents}



Introduction

In this blog post, I’m going to talk about Jason Web Token (JWT) and how we developed a secure spring boot application using JWT. I think you will be able to get a basic understanding of JWT and how to use that in a real project.

In Part 1

{getCard} $type={post}

I have developed simple project to demonstrate how authorization process work with JWT. 

You already known how to initialize new spring boot project with adding necessary dependencies. 


In Part 2

{getCard} $type={post}

I have created a user class inside the entity package with several attributes such as id, username, password and email.

You already known how to create user class, user authorize request and repository to find user by username by using Jpa Repository.


UserDetailServiceImpl

In this Part 3, I have created a class called UserDetailServiceImpl. In this class I have used Spring security features, you can see implemented UserDetailsService interface. 

The UserDetailsService is a core interface in Spring Security framework, which is used to retrieve the user’s authentication and authorization information. 

This interface has only one method named loadUserByUsername which we can implement to feed the customer information to the Spring security API.




Watch Full Video of Part3.



Previous Post Next Post