Small REST API template written in Golang using Gin, PostgreSQL, JWT and Redis. Project: user profile CRUD with authorization, authentication and token validation, Swagger generator and metrics gainer
Endpoints:
POST:/api/v1/users - registrates new user
POST:/api/v1/auth - authorizes user, generates JWT token and writing it in cache
POST:/api/v1/auth/changePassword - changes password with deleting valid token in Redis valid tokens storage (requires token in Bearer header)
GET:/api/v1/users/:username - get user profile by username (requires token in Bearer header)
GET:/api/v1/users/me - returns current user profile (requires token in Bearer header)
PATCH:/api/v1/users/me - updates current user profile (requires token in Bearer header)