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:
If you are looking for Server Side Sessions, watch this video:
Here are a couple blog posts for more information:
~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/
~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 Ses
17 views
797
243
2 weeks ago 00:03:41 7
Alex Warren & ROSÉ - On My Mind (Official Music Video)
3 weeks ago 00:03:41 0
Amcrest 4K NVR Review: Your Security Just Got Smarter, Scarier… and Kinda Sexy? - YouTube
4 weeks ago 00:10:07 4
Why I Don’t Expect a Windows 10 Apocalypse
1 month ago 00:10:01 0
Huge SHOCK to SWEDEN and FINLAND: Russia Severely Punished LITHUANIA and Forced NATO Back Down