Skip to content

Java REST API project using Spring Boot 3, Spring Security 6 for JWT Authentication and Authorization, and H2 database

License

Notifications You must be signed in to change notification settings

erebelo/spring-security-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Security JWT

REST API project developed in Java using Spring Boot 3, Spring Security 6 for JWT Authentication and Authorization, and H2 database.

Features

  • Token-based Authentication using JSON Web Token (JWT)
  • Role-based authorization
  • Encoding password with BCrypt algorithm

Requirements

  • Java 17
  • Spring Boot 3.x.x
  • Spring Security 6.x.x
  • Apache Maven 3.8.6

Libraries

  • spring-common-parent: Manages the Spring Boot version and provide common configurations for plugins and formatting.

Run App

  • Set the following environment variables: ADMIN_PASSWORD and SECRET_KEY (size >= 256 bits).
  • Run the SpringSecurityJwtApplication class as Java Application.

Collection

Project Collection

AWS Demo

Spring Security JWT

AWS Deployment

Follow the AWS Docker guide to deploy a Java App instance and how to set up Nginx as a reverse proxy with a valid Wildcard SSL/TLS certificate.