spring-boot-security-jwt

Installation
Summary

JWT authentication and authorization for Spring Boot 3.5.x with token generation, refresh strategies, and role/permission-based access control.

  • Covers token generation with JJWT, Bearer/cookie authentication, and stateless session management using Spring Security 6.x
  • Supports database-backed and OAuth2 provider integration (Google, GitHub) with modern SecurityFilterChain configuration
  • Includes refresh token rotation, token blacklisting, and key rotation strategies for production security
  • Provides role-based (RBAC) and permission-based access control patterns with custom permission evaluators and @PreAuthorize annotations
  • Implements JWT filters, authentication endpoints, and comprehensive test patterns for security validation
SKILL.md

Spring Boot JWT Security

JWT authentication and authorization patterns for Spring Boot 3.5.x using Spring Security 6.x and JJWT. Covers token generation, validation, refresh strategies, RBAC/ABAC, and OAuth2 integration.

Overview

This skill provides implementation patterns for stateless JWT authentication in Spring Boot applications. It covers the complete authentication flow including token generation with JJWT 0.12.6, Bearer/cookie-based authentication, refresh token rotation, and method-level authorization with @PreAuthorize expressions.

Key capabilities:

  • Access and refresh token generation with configurable expiration
  • Bearer token and HttpOnly cookie authentication strategies
  • Integration with Spring Data JPA and OAuth2 providers
  • RBAC with role/permission-based @PreAuthorize rules
  • Token revocation and blacklisting for logout/rotation

When to Use

Activate when user requests involve:

  • "Implement JWT authentication", "secure REST API with tokens"
Related skills

More from giuseppe-trisciuoglio/developer-kit

Installs
1.0K
GitHub Stars
246
First Seen
Feb 3, 2026