Back to rankings

Sample project on how to implement JWT security based using Spring boot 3 and Spring security 6

authenticationdockerdocker-composeintellij-ideajwtjwt-authenticationpostgressqlspring-bootspring-security
Star Growth
Stars
2k
Forks
929
Weekly Growth
Issues
18
1k2k
Dec 2022Feb 2024May 2025Jul 2026
ArtifactsMavengit clone https://github.com/ali-bouali/spring-boot-3-jwt-security.git
README

Spring Boot 3.0 Security with JWT Implementation

This project demonstrates the implementation of security using Spring Boot 3.0 and JSON Web Tokens (JWT). It includes the following features:

Features

  • User registration and login with JWT authentication
  • Password encryption using BCrypt
  • Role-based authorization with Spring Security
  • Customized access denied handling
  • Logout mechanism
  • Refresh token

Technologies

  • Spring Boot 3.0
  • Spring Security
  • JSON Web Tokens (JWT)
  • BCrypt
  • Maven

Getting Started

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

  • JDK 17+
  • Maven 3+

To build and run the project, follow these steps:

  • Clone the repository: git clone https://github.com/ali-bouali/spring-boot-3-jwt-security.git
  • Navigate to the project directory: cd spring-boot-security-jwt
  • Add database "jwt_security" to postgres
  • Build the project: mvn clean install
  • Run the project: mvn spring-boot:run

-> The application will be available at http://localhost:8080.

Related repositories
pocketbase/pocketbase

Open Source realtime backend in 1 file

GoGo ModulesMIT Licenseauthenticationbackend
pocketbase.io
60.1k3.6k
better-auth/better-auth

The most comprehensive authentication framework

TypeScriptnpmMIT Licenseauthenticationoauth
better-auth.com
29.3k2.7k
authelia/authelia

The Single Sign-On Multi-Factor portal for web apps, now OpenID Certified™

GoGo ModulesApache License 2.0totpldap
authelia.com
28.3k1.4k
nextauthjs/next-auth

Authentication for the Web.

TypeScriptnpmISC Licensenodejsnextjs
authjs.dev
28.3k4k
heartcombo/devise

Flexible authentication solution for Rails with Warden.

RubyRubyGemsMIT Licenserailsruby
24.3k5.5k
goauthentik/authentik

The authentication glue you need.

PythonPyPIOthersamlsaml-idp
goauthentik.io
22.4k1.7k
mikeroyal/Self-Hosting-Guide

Self-Hosting Guide. Learn all about locally hosting (on premises & private web servers) and managing software applications by yourself or your organization. Including Cloud, LLMs, WireGuard, Automation, Home Assistant, and Networking.

Dockerfileself-hostedselfhosted
22k1.1k
apache/casbin

Apache Casbin: an authorization library that supports access control models like ACL, RBAC, ABAC.

GoGo ModulesApache License 2.0casbinaccess-control
casbin.apache.org
20.3k1.8k
casbin/casbin

An authorization library that supports access control models like ACL, RBAC, ABAC in Golang: https://discord.gg/S5UjpzGZjN

GoGo ModulesApache License 2.0casbinaccess-control
casbin.org
18.3k1.7k
supertokens/supertokens-core

Open source alternative to Auth0 / Firebase Auth / AWS Cognito

JavaMavenOtherauthenticationsession-management
supertokens.com
15.2k735
wasp-lang/open-saas

A 100% free modern JS SaaS boilerplate (React, NodeJS, Prisma). Full-featured: Auth (email, google, github, slack, MS), Email sending, Background jobs, Landing page, Payments (Stripe, Polar.sh), Shadcn UI, S3 file upload. AI-ready with tailored AGENTS.md, skills, and Claude Code plugin. One cmd deploy. Powered by Wasp full-stack framework.

TypeScriptnpmMIT Licensefull-stackopen-source
opensaas.sh
15k1.8k
zitadel/zitadel

ZITADEL - Identity infrastructure, simplified for you.

GoGo ModulesGNU Affero General Public License v3.0samlauthentication
zitadel.com
14.5k1.2k