Skip to content

gitkoDev/golang_auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medods Authentication Service

JWT Golang Authentication service built with Clean Architecure and Dependency Injection principles

Endpoints

  • 0.0.0.0:8080/v1/health   =>GET=>   Check API connection

  • 0.0.0.0:8080/v1/auth?id={user id}=>GET=>   Get token pair

Response example:

{
    "access_token": "access_token",
    "refresh_token": "refresh_token",
    "user_ip": "172.24.0.1"
}
  • 0.0.0.0:8080/v1/auth/refresh   =>POST=>   Refresh token pair

Response example:

{
    "access_token": "access_token",
    "refresh_token": "refresh_token",
}

Running the app

# start the app
make run

Tools used

  • Logging   =>   Logrus
  • Routing   =>   Gin
  • Database   =>   Postgres + pgx
  • Database migrations   =>   Goose
  • Containerization   =>   Docker + Docker Compose
  • Authentification and middleware   =>   JWT Go

About

Golang authentification service providing authentication and refresh tokens

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors