https://github.com/sagarmaheshwary/microservices-authentication-service
https://github.com/sagarmaheshwary/microservices-authentication-service
golang grpc grpc-go microservices
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sagarmaheshwary/microservices-authentication-service
- Owner: SagarMaheshwary
- License: mit
- Created: 2024-03-24T08:19:10.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-19T18:33:35.000Z (over 1 year ago)
- Last Synced: 2024-04-19T19:42:34.530Z (over 1 year ago)
- Topics: golang, grpc, grpc-go, microservices
- Language: Go
- Homepage:
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# MICROSERVICES - AUTHENTICATION SERVICE
Authentication Service for the [Microservices](https://github.com/SagarMaheshwary/microservices) project.
### OVERVIEW
- Golang
- ZeroLog
- gRPC – Acts as both the main server and client for the User service
- JWT (JSON Web Tokens) – Used for authentication and secure communication
- Redis - Maintains the token blacklist
- Prometheus Client – Exports default and custom metrics for Prometheus server monitoring### SETUP
Follow the instructions in the [README](https://github.com/SagarMaheshwary/microservices?tab=readme-ov-file#setup) of the main microservices repository to run this service along with others using Docker Compose.
### APIs (gRPC)
Proto files are located in the **internal/proto** directory.
| SERVICE | RPC | METADATA | DESCRIPTION |
| -------------------------------------------------------------- | ----------- | ----------------------------------- | ---------------------------------------------- |
| AuthService | Register | - | User registration |
| AuthService | Login | - | User login |
| AuthService | VerifyToken | Bearer token in "authorization" key | Token verification and getting user data |
| AuthService | Logout | Bearer token in "authorization" key | User logout by adding token to redis blacklist |
| [Health](https://google.golang.org/grpc/health/grpc_health_v1) | Check | - | Service health check |### APIs (REST)
| API | METHOD | BODY | Headers | Description |
| -------- | ------ | ---- | ------- | --------------------------- |
| /metrics | GET | - | - | Prometheus metrics endpoint |