In this article, you will learn how to implement authentication and role-based authorization in Golang using JSON Web Tokens (JWT).
https://codevoweb.com/json-web-token-authentication-and-authorization-in-golang/
Repository from Github https://github.comwpcodevo/go-postgres-jwt-auth-api