In this article, we will learn about implementing JWT Authentication in Golang REST APIs and securing it with Authentication Middleware. We will be building a simple, yet neatly organized Golang REST API with packages like Gin for Routing (mostly), GORM for persisting user data to a MySQL Database, and so on.
Topics covered:
- JWT Explained
- What we will Build?
- Gin Framework – Quick Introduction
- Setting up Database with GORM
- User Registration & Password Hashing
- Generating JWTs
- Authentication Middleware to Valid JWTs
- Gin Routing & Grouping
- Testing Golang API with VSCode REST Client
Read the entire article here: https://codewithmukesh.com/blog/jwt-authentication-in-golang/