Loading repository data…
Loading repository data…
gondkar-saish / repository
This is a Spring Boot role-based authentication project. I used JWT for stateless authentication. Users can register and log in. Passwords are encrypted using BCrypt. After login, the server returns a JWT token.
A Spring Boot backend project that implements authentication and role-based authorization using Spring Security, JWT, and MySQL.
This project allows users to register, login, receive a JWT token, and access protected APIs based on their assigned role such as USER, ADMIN, or MANAGER.
The main goal of this project is to understand how backend security works in a real Spring Boot application.
Instead of allowing every user to access every API, this project checks:
src/main/java/com/yourpackage/rolebasedauth
│
├── controller
│ ├── AuthController.java
│ ├── AdminController.java
│ └── UserController.java
│
├── service
│ ├── AuthService.java
│ ├── UserService.java
│ └── impl
│ ├── AuthServiceImpl.java
│ └── UserServiceImpl.java
│
├── repository
│ └── UserRepository.java
│
├── entity
│ ├── User.java
│ └── Role.java
│
├── dto
│ ├── RegisterRequest.java
│ ├── LoginRequest.java
│ ├── AuthResponse.java
│ └── UserResponse.java
│
├── security
│ ├── SecurityConfig.java
│ ├── JwtService.java
│ ├── JwtAuthenticationFilter.java
│ └── CustomUserDetailsService.java
│
├── exception
│ ├── ResourceNotFoundException.java
│ ├── DuplicateResourceException.java
│ └── GlobalExceptionHandler.java
│
└── RoleBasedAuthorisationSystemApplication.java