Golang: Introduction to REST API JWT auth with Golang (Udemy.com)

Golang: Intro to JWT Auth with Golang (Go programming language)

Created by: Mike M

Produced in 2022

What you will learn

  • Build a user registration and login backend with Golang
  • Understand JSON Web Tokens (Header, Payload, Signature)
  • Create RESTful APIs (user signup, login and a protected endpoint)
  • Authenticate users with email, password and a JWT
  • Secure RESTful endpoints with JWTs
  • Examine the internals of a JWT
  • Sign and validate a JWT
  • Create a Postgres database instance and a users table and insert records into the table
  • Examine the definitions of different Golang package methods

Quality Score

Content Quality
Video Quality
Qualified Instructor
Course Pace
Course Depth & Coverage

Overall Score : 88 / 100

Live Chat with CourseDuck's Co-Founder for Help

Need help deciding on a go course? Or looking for more detail on Mike M's Golang: Introduction to REST API JWT auth with Golang? Feel free to chat below.
Join CourseDuck's Online Learning Discord Community

Course Description

Build Golang (Go programming language) REST API authentication with JWTs is a straightforward introductory guide on creating secure Golang APIs with JSON Web Tokens (JWTs).
You will:
- learn the theory behind JSON WEB TOKENs (JWTs) and how they are constructed and used,
- build a Golang (Go programming language) signup handler function that takes the user's credentials such as email and password and saves them on a PostgreSQL database table,
- implement a Golang (Go programming language) utility that generates password hashes with the bcrypt' package to avoid storing plain text passwords on the database
- build a Golang (Go programming language) login handler function that takes user credentials and verifies the user based on their supplied credentials
- implement a Token generator utility that takes the user's credentials, and together with developer specified secret and claims, generates a JSON Web Token (JWT),
- create a Golang (Go programming language) middleware function that validates a JWT token upon request to restricted routes
Also, Throughout the process you will learn several Golang (Go programming language) and REST API authentication concepts.
Aside from Golang (Go programming language), some of the major technologies you will use are:
  • PostgreSQL database to create a database instance and a users table where your records will be stored in,
  • jwt-go' package for generating the JSON Web Token and its validation,
  • gorilla/mux' package for creating the router that your endpoints and handler functions will be registered on,
  • pq' package for parsing your database instance's URL,
  • database/sql' package for establishing and maintaining connection with your database instance,
  • bcrypt' package for generating and comparing your password hashes,
  • Postman application for testing your APIs with several HTTP requests

Who this course is for:
  • Anyone interested in creating JWT authenticated RESTful APIs with Golang

*Some courses are excluded from this sale. Coupon not working? If the link above doesn't drop prices, clear the cookies in your browser and then click this link here.
Also, you may need to apply the coupon code directly on the cart page to get the discount.

Coupon Code

Instructor Details

Mike M

I am a Software developer with a degree in Electrical Engineering and over three years of software development experience. I use Javascript and several other software development tools on a daily basis. I have experience with HTML5, CSS3, Angular, Ember, React, Vue.js, Go, MySql, Python, Node.js, Express.js and various other development tools. I enjoy coding and sharing my knowledge with others.



49 total reviews

5 star 4 star 3 star 2 star 1 star
% Complete
% Complete
% Complete
% Complete
% Complete

Course is pretty good. It sheds light on basic usage of JWT. Provides resources where you can learn more about JWT. Also it's interesting to see how in part 2, we extract code into different files/folders from one big main.go file to make code look better.

Excellent course! It would be really good if the instructor can add something about tests (unit and integration tests)

Not a bad course until the refactor, seems as thought the author attempted to update the course. The code created during the course is not the same code that was refactored in sections 23, 24 and 25. If you've programed before you can figure things out

Excellent course! very good content if you are a go backend developer

Not only the tutor did the job but spent time refactoring the code so students can go learn the thinking process of how to write clean code.For any web technology programmer, this is a brilliant learning course if you are interested in Golang.

Audio could be better. There are parts where the instructor goes over everything a little too quickly, especially when there is audio that cuts in. Seemed there was a section that wasn't included before using the JWT module.

Most of the course is focused on building http server in go. There was not enough content related with jwt tokens, why they are useful and in what situations they should be used.On top of that the refactoring part is very poorly designed. The structure of the project after refactor goes against go best practices, e.g.- meaningful names for packages - names like utils or models, etc. does say anything about that the package is about- dependency injection could be done better- there is no need to instantiate repo in every method of user controller- controller should not receive db as an argument, the whole point of having repository is encapsulation of db connection- driver package seems out of place, all the db related code should live in the same package, imo

Good course for a beginner in GO like me. Short and to the point.I'm glad I took this course.

Perfect course for intermediate Golang.

Muito bom o curso - instrutor tem boa didtica e os exemplos s�o coerentes no contexto, principalmente no uso da funcionalidade do jwt demonstrando o uso no projeto de demonstra�o

All killer no filler- btw this box is invoking the iPhone keyboard, which makes it impossible to hit the submit button

This course explains a lot about, standard library (database/sql, encoding/json), the packages, and what JWT is.