How sahilbehera6531/authsphere works
AuthSphere is a REST backend for identity, authorization, user administration, and memberships. Users register or log in through the API, receive JWT and refresh-token credentials, and use protected endpoints for profiles and subscriptions; administrators manage users, roles, and plans. The graph shows the API-to-service workflow and the documented security and persistence layers. Several controller and service links are supported by the source index; unsampled implementation details are not asserted, and Redis is shown as an optional documented capability.
Main entry points: AuthServiceImpl.java Authentication Service · MembershipServiceImpl.java Membership Service · UserRepository.java Data Repositories · AuthController.java Authentication API
Components 19
REST API
- Authentication API
src/main/java/com/sahil/authsphere/controller/AuthController.java - User API
src/main/java/com/sahil/authsphere/controller/UserController.java - Admin API
src/main/java/com/sahil/authsphere/controller/AdminController.java - Membership API
src/main/java/com/sahil/authsphere/controller/MembershipController.java - API Documentation
src/main/java/com/sahil/authsphere/config/OpenApiConfig.java - Error Handling
src/main/java/com/sahil/authsphere/exception/GlobalExceptionHandler.java
Identity and Security
- Authentication Service
src/main/java/com/sahil/authsphere/service/impl/AuthServiceImpl.java - Refresh Token Service
src/main/java/com/sahil/authsphere/service/impl/RefreshTokenServiceImpl.java - JWT Service
src/main/java/com/sahil/authsphere/security/JwtService.java - Request Security
src/main/java/com/sahil/authsphere/security/JwtAuthenticationFilter.java - Security Configuration
src/main/java/com/sahil/authsphere/config/SecurityConfig.java
User Administration
- User Service
src/main/java/com/sahil/authsphere/service/impl/UserServiceImpl.java - User Domain
src/main/java/com/sahil/authsphere/entity/User.java
Memberships
- Membership Service
src/main/java/com/sahil/authsphere/service/impl/MembershipServiceImpl.java - Membership Domain
src/main/java/com/sahil/authsphere/entity/Membership.java
Persistence
- Data Repositories
src/main/java/com/sahil/authsphere/repository/UserRepository.java - PostgreSQL
- Redis Cache
Other components
- API Client
Connections 19
- API Client → Authentication API: submits credentials
README.md - API Client → User API: manages profile
README.md - API Client → Membership API: manages subscription
README.md - Authentication API → Authentication Service: delegates auth
src/main/java/com/sahil/authsphere/controller/AuthController.java - User API → User Service: delegates user operations
src/main/java/com/sahil/authsphere/controller/UserController.java - Admin API → User Service: delegates administration
src/main/java/com/sahil/authsphere/controller/AdminController.java - Membership API → Membership Service: delegates membership
src/main/java/com/sahil/authsphere/controller/MembershipController.java - Authentication Service → JWT Service: issues tokens
src/main/java/com/sahil/authsphere/service/impl/AuthServiceImpl.java - Authentication Service → Refresh Token Service: rotates tokens
src/main/java/com/sahil/authsphere/service/impl/AuthServiceImpl.java - Security Configuration → Request Security: configures requests
- Request Security → JWT Service: validates JWT
- Authentication Service → Data Repositories: accesses users
src/main/java/com/sahil/authsphere/service/impl/AuthServiceImpl.java - Membership Service → Data Repositories: accesses membership data
src/main/java/com/sahil/authsphere/service/impl/MembershipServiceImpl.java - Data Repositories → PostgreSQL: persists records
README.md - Membership Service → Membership Domain: manages membership state
src/main/java/com/sahil/authsphere/service/impl/MembershipServiceImpl.java - Authentication Service → User Domain: creates accounts
src/main/java/com/sahil/authsphere/service/impl/AuthServiceImpl.java - API Client → API Documentation: views API docs
README.md - API Client → Error Handling: receives API errors
- Membership Service → Redis Cache: may use caching
README.md