Securing Your Go REST APIs with JSON Web Tokens(JWTS)

preview_player
Показать описание

● SUBSCRIBE to see more of my Videos & hit that LIKE button to support the channel!

In this tutorial, we’ll be looking at exactly what it takes to build a secure Go-based REST API that uses JSON Web Tokens to communicate!

‎--------------

🎥 Recording Setup

Рекомендации по теме
Комментарии
Автор


This covers everything from project setup and layout, testing, and best practices around things like versioning.

Tutorialedge
Автор

This is perfect! I enjoyed every bit of it. Please, keep it up! Cheers!

matt-klausmushi
Автор

Great tutorial ! but could you make video how to secure REST API using "OAuth2 " authentication

lauradohina
Автор

Followed the steps and still works like a charm!

roblesrt
Автор

No fuss and crystal clear, great video!

Maxiride
Автор

Nice work. I'd love to see a part 2 that replaces the hard coded secret

christsantiris
Автор

Nice Tutorial, I would split it into 2 videos !

omartahboub
Автор

thanks for the tutorial sir, but please try to explain line by line code like why we use token.Claims.(jwt.MapClaims)
it return map[string]interface{}, please try to explain every code bit by bit.

mukulverma
Автор

Any recommendations on how we would approach refreshing the token?

pokegaiyui
Автор

Excellent !!! Awesome, I understand how JWT is working. Thanks!!!

dineshgupta
Автор

Nice video and thanks for making it. I have watched a few of your videos and would like to point out the bad habit that you are teaching people so that you can try to avoid it in the future. Many of your if statements that handle errors simply print the error and then continue on. This causes problems as your error statement is checking if values are set for future work in the code path. Without a return or some form of exit or handling you will just get a wave of errors or worse unauthorised access because you checked the values and then didn't exit.

randycoburn
Автор

Great video! Thanks. Can you please share info on how we can validate a PoP token using Go?

me
Автор

Awesome dude! Keep up the good work :)

abhinavsingh
Автор

How do you decode the jwt and access the claims?

korbkrys
Автор

I just have some problems, I downloaded and imported JWT lib, but some functions like jwt.Parse or jwt.NewWithClaims are not working, they just like "Unresolved reference", and there are also errors in the root folder of the downloaded library

vladixus
Автор

There is no way to access the tokens information from the handler. It's only accessible in your auth middleware.

EnitinEnitin
Автор

came for golang, stayed for the accent

lashbash
Автор

Great tutorial! If you wanted the client to be a browser would you just pass in a login endpoint and if there is no token direct them to the login or is there a different pattern for that kind of workflow?

gcstang
Автор

Please don't be lazy about handling errors. A lot of people use this to learn Go and might be confused about what the best practices are.

zaqqoZeq
Автор

Great tutorial, thank you! Question, at 7:48 would the os.get variable be compatible just like that or should we put it inside the byte array as the text string you used as key before?

AdrianLabs
join shbcf.ru