Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 AuthSphere Microservice

Go Version License Build Status Docker Ready

A high-performance, production-ready Authentication and Authorization Service built with Go, PostgreSQL. AuthSphere provides robust JWT-based authentication featuring stateless short-lived Access Tokens, secure HttpOnly cookie-based Refresh Tokens, blacklisting/revocation support, and role-based protected routes.

🌟 Key Features

  • User Onboarding & Management: User registration with hashed password storage (Bcrypt), login, and logout.
  • Dual-Token Architecture:
    • Access Token: Short-lived JWT (e.g., 15 mins) passed via Authorization: Bearer <token> header.
    • Refresh Token: Long-lived token (e.g., 7 days) stored in a secure HttpOnly, SameSite=Strict, Secure cookie.
  • Token Invalidation & Logout: Revokes refresh tokens and blacklists active sessions using Redis.
  • Protected Routes: Middleware enforcement for authenticated users and RBAC (Role-Based Access Control).
  • Security Best Practices:
    • OWASP compliant password hashing.
    • Rate limiting on public auth endpoints.
    • CORS and CSRF protections.
  • Developer-Friendly: Hot-reloading setup via Air, clean architecture, and full Docker Compose support.

About

A high-performance, production-ready **Authentication and Authorization Service** built with Go, PostgreSQL. AuthSphere provides robust JWT-based authentication featuring **stateless short-lived Access Tokens**, **secure HttpOnly cookie-based Refresh Tokens**, blacklisting/revocation support, and role-based protected routes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages