https://github.com/nadimnesar/spring-security-jwt-auth-module
Ready-to-use starter module for authentication and authorization (JWT-based) using Spring Boot and Spring Security.
https://github.com/nadimnesar/spring-security-jwt-auth-module
gradle h2-database java jwt-authentication jwt-authorization restful-api spring-boot spring-security
Last synced: 2 months ago
JSON representation
Ready-to-use starter module for authentication and authorization (JWT-based) using Spring Boot and Spring Security.
- Host: GitHub
- URL: https://github.com/nadimnesar/spring-security-jwt-auth-module
- Owner: nadimnesar
- License: mit
- Created: 2024-06-29T17:21:41.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-28T12:02:54.000Z (almost 2 years ago)
- Last Synced: 2025-08-16T01:38:19.173Z (10 months ago)
- Topics: gradle, h2-database, java, jwt-authentication, jwt-authorization, restful-api, spring-boot, spring-security
- Language: Java
- Homepage:
- Size: 682 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Security JWT Auth Module
[]()
[](https://github.com/nadimnesar/spring-security-jwt-authentication-module/issues)
[](https://github.com/nadimnesar/spring-security-jwt-authentication-module/pulls)
[](https://github.com/nadimnesar/spring-security-jwt-authentication-module/commits)
[](/LICENSE)
---
This project is a ready-to-use starter module for authentication and authorization (JSON Web Token-based) using Spring Boot and Spring Security. It avoids deprecated methods, ensuring compatibility and security.
## Prerequisite
- JDK 21
- Spring Boot >= 3.3.1
- Spring Security >= 6.3.1
- H2 Database
- Gradle (Groovy)
- Base64 Encoded Secret Key (generate at [Base64Encode.org](https://www.base64encode.org/))
## Features
* Registration
* Login
* API method security with roles
## RESTful API Details
### Registration
- `POST /api/auth/register`
- `POST /api/auth/admin/register`

### Login
- `POST /api/auth/login`

### Refresh Token
- `POST /api/auth/refresh`

### Authorization
- `GET /api/user/`
- `GET /api/admin/`