Skip to content

Emma20040/Spring-Boot-Authentication-Authorization-Server

Repository files navigation

🔐 Spring Boot Authentication & Authorization Server

MIT License Spring Boot Java PostgreSQL Redis

A secure, scalable, and feature-rich authentication and authorization server built with Spring Boot. Supports manual and OAuth2 (Google) login, JWT-based sessions, Redis integration, and enterprise-grade security measures.


✨ Features

  • 🔐 Multi-Factor Authentication - Manual signup/login + Google OAuth2 integration
  • 📧 Email Verification & Password Reset - Secure token-based flows with expiration
  • 🔄 JWT & Refresh Token Management - Redis-backed token blacklisting and refresh
  • 🛡️ Advanced Security - reCAPTCHA v3, hybrid rate limiting, bcrypt password hashing
  • 🔗 Account Linking - Merge manual and Google accounts seamlessly
  • 👥 Role-Based Access Control - Fine-grained permissions (ROLE_USER, ROLE_ADMIN)
  • ⚡ Redis Integration - Caching, rate limiting, token storage, and blacklisting
  • 🐳 Docker Ready - Containerized deployment support
  • 📈 Production Ready - Designed for cloud deployment and scaling

🏗️ System Architecture

Technology Stack

  • Backend: Spring Boot 3.x (Web, Security, Data JPA, OAuth2)
  • Database: PostgreSQL with optimized user schema
  • Cache/Storage: Redis for performance and security
  • Authentication: JWT, Google OAuth2, reCAPTCHA v3
  • Security: HTTPS, bcrypt, hybrid rate limiting, token blacklisting
  • Build: Maven, Lombok, Spring Initializr

Database Schema

users (
    id UUID PRIMARY KEY,
    username VARCHAR(255) UNIQUE NOT NULL,
    email VARCHAR(255) UNIQUE NOT NULL,
    password VARCHAR(255) NOT NULL,
    google_id VARCHAR(255) UNIQUE NULL,
    role VARCHAR(50) NOT NULL,
    created TIMESTAMP NOT NULL
)

About

A secure Spring Boot authentication server supporting manual & Google OAuth2 login, JWT refresh, Redis caching, rate limiting, and reCAPTCHA protection. Built for scalability and ease of integration

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors