Skip to content

potatogopher/jwt-go-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

JWT Go Example

I put this repo together so there would be something up for the video showing a JWT example using Go from WilliamKennedy's Youtube page.

The presenter is using the following resources to authenticate with JWTs:

Set Up

$ git clone git@github.com:nicholasrucci/jwt-go-example.git
$ cd jwt-go-example

Create Private & Public Keys

$ openssl genrsa -out demo.rsa
$ openssl rsa -in demo.rsa -pubout > demo.rsa.pub

Test

$ curl localhost:3000/login
// returns JWT

$ curl -H "Authorization: Bearer <JWT>" localhost:3000/api
// if valid: returns Success
// else: error

About

JWT example using Go from WilliamKennedy's Youtube page.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages