https://github.com/ar-ecommerce-platform/auth-service
Handles user authentication and JWT management
https://github.com/ar-ecommerce-platform/auth-service
authentication jwt security spring-boot
Last synced: 3 months ago
JSON representation
Handles user authentication and JWT management
- Host: GitHub
- URL: https://github.com/ar-ecommerce-platform/auth-service
- Owner: ar-ecommerce-platform
- Created: 2025-09-11T02:14:39.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-10-31T12:21:44.000Z (8 months ago)
- Last Synced: 2025-10-31T14:29:49.968Z (8 months ago)
- Topics: authentication, jwt, security, spring-boot
- Language: Dockerfile
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Roadmap: ROADMAP.MD
Awesome Lists containing this project
README
# 🔐 Auth Service
Authentication and authorization microservice for the eCommerce platform.
Manages **user login**, **JWT generation**, and **token validation**.
---
## 🧭 Overview
- Exposes REST APIs for user authentication and token issuance.
- Uses **Spring Security** and **JWT** for stateless authentication.
- Integrates with **PostgreSQL** (production) and **H2** (development).
---
## 🧪 API Endpoints
| Method | Endpoint | Description |
|---------|-----------|-------------|
| `POST` | `/auth/register` | Register a new user |
| `POST` | `/auth/login` | Authenticate user and return JWT |
| `GET` | `/auth/validate` | Validate JWT token |
---
## ▶️ Run Locally
```bash
./gradlew bootRun
```
---
## 🧱 Docker
```bash
docker build -t ecommerce/auth-service .
docker run -d -p 8081:8081 ecommerce/auth-service
```
---
## 🧰 Environment Variables
| Variable | Description |
|-----------|-------------|
| `JWT_SECRET` | Secret key for token signing |
| `DB_URL` | JDBC connection string |
| `DB_USERNAME` | Database username |
| `DB_PASSWORD` | Database password |
---
## 🧰 Related Services
| Service | Port | Purpose |
|----------|------|----------|
| Discovery Server | 8761 | Service registry |
| Config Server | 8888 | Centralized configuration management |
| API Gateway | 8080 | Routes traffic |
| Auth Service | 8081 | Auth / JWT |
| User Service | 8082 | User data |