Skip to content

Complete implementation of authentication and role-based authorization using Spring Security with Json Web Token (JWT)

Notifications You must be signed in to change notification settings

gvlima/spring-boot-jwt-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JWT Implementation with Spring Boot 3 and Spring Security 6

This project showcases a complete implementation of authentication and authorization process using of JSON Web Tokens(JWT) with Spring Boot 3 and Spring Security 6.

Features

  • User login and registration
  • Password encryption
  • Update password
  • Persistence layer with Spring Data JPA and database
  • Token-based authentication
  • Security filter for protected routes
  • Role-Based authorization with authorities (pending)
  • Custom access denied handling (pending)
  • Refresh token (pending)

Tecnologies

  • Java 21
  • Spring Boot 3.5.x
  • Spring Security 6.5.x
  • H2 Database
  • JJWT (Java JWT)
  • MapStruct
  • Lombok
  • Maven

Getting Start

To get started with this project, you will need to have the following installed on your local machine:

  • JDK 21
  • Maven 3+

To build and run the project, follow these steps:

# Install dependencies and compile project
mvn clean install

# Run application
mvn spring-boot:run

References

Spring Security Architecture - Filter
Securing Web Application
Spring Security

About

Complete implementation of authentication and role-based authorization using Spring Security with Json Web Token (JWT)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages