jwt-oauth-sso

module
v0.0.0-...-fb78454 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: MIT

README

JWT OAuth SSO

JWT OAuth SSO is a Go-based authentication server template that provides a complete solution for handling authentication, authorization, and session management using JWT (JSON Web Tokens). It follows the OAuth2 and REST API architectural approaches, offering Single Sign-On (SSO) capabilities.

Features:

  • OAuth2-compliant access and refresh token flows
  • JWT-based access tokens with a 15-minute expiration for secure API access
  • Database-backed refresh tokens with IP, device, and user tracking, valid for 1 month
  • SSO support for seamless user login across multiple applications
  • Session management with the ability to revoke individual or all refresh tokens per device
  • Customizable fields and validation for flexible authentication processes
  • RESTful API for integration with both frontend and backend services
  • Device-based session tracking to enhance security and user control

Use Cases:

  • Single Sign-On (SSO) systems for microservices architecture
  • Secure API authentication and authorization
  • User session management with custom refresh token handling

Usage:

This template serves as a starting point for creating scalable and secure authentication services using:

  • Go 1.22
  • GORM ORM
  • Sqlite3 Database
  • UberFx Dependency Injection
  • Unit Test
  • GoMock
  • Gin HTTP Framework

Directories

Path Synopsis
cmd
internal
mocks
configs
Package configs_mocks is a generated GoMock package.
Package configs_mocks is a generated GoMock package.
http/requests
Package requests_mocks is a generated GoMock package.
Package requests_mocks is a generated GoMock package.
http/responses
Package responses_mocks is a generated GoMock package.
Package responses_mocks is a generated GoMock package.
http/routes
Package routes_mocks is a generated GoMock package.
Package routes_mocks is a generated GoMock package.
repositories
Package repositories_mocks is a generated GoMock package.
Package repositories_mocks is a generated GoMock package.
services
Package services_mocks is a generated GoMock package.
Package services_mocks is a generated GoMock package.
tokens
Package tokens_mocks is a generated GoMock package.
Package tokens_mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL