Secure Your Go REST API with JWT Authentication
In this video we are going to look at using JSON Web Tokens to secure your Go REST API. We will learn how to create a JWT and use middleware to ensure that the REST API is secured.
JWTs, in my opinion, are better suited for a REST API. If you wish to secure a web application using JWTs, you can get it to work but I think Server Side Sessions are better suited. Of course, if you need to be flexible with having your server secured for a web browser, a mobile app, another server, using curl, etc, then you will probably need to use JWT Authentication.
More Information on the JWT specification: https://www.rfc-editor.org/rfc/rfc7519
If you are looking for Server Side Sessions, watch this video: https://youtu.be/Ck919fGGbCw
Here are a couple blog posts for more information: http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/ http://cryto.net/~joepie91/blog/2016/06/19/stop-using-jwt-for-sessions-part-2-why-your-solution-doesnt-work/
And here is the video explaining JWTs vs Server Side Sessions: https://youtu.be/U6OcC0yq1CE
If you wanna support my channel, you can buy me a coffee: âď¸ https://www.buymeacoffee.com/nerdcademy Coffee make the code go!!!
All code found in this video will be at: đť https://github.com/NerdCademyDev/golang
đ¤ Let me know if you have any issues!
âĄď¸ What else would you like me to cover?
đ Always Keep Learning!
đ¨ Gopher Character artwork from: https://github.com/MariaLetta/free-gophers-pack
#golang #jwt #nerdcademy ... https://www.youtube.com/watch?v=-Eei8eik1Io
67112686 Bytes