Skip to content

JWT acknowledgements as package, coroutine or microservice

Notifications You must be signed in to change notification settings

gobricks/jwtack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jwtack

JWTAck – jwt acknowledgements as package, coroutine or microservice

##Usage:

  1. as package:
import jwtackpckg "github.com/gobricks/jwtack/src"
jwtack := jwtackpckg.NewService()
  1. as coroutine:
import jwtack "github.com/gobricks/jwtack/src"

app := app.NewApp()
app.Cfg.Port = "8080"

jwtack.RunServer(app)
  1. as microservice:
(export PORT=36701; ./jwtack)

CreateToken:

$ curl -H 'X-Jwtack-Key:12345' -d '{"payload":{"asdf":1,"qwer":"wwertwert"}}' http://localhost:36701/api/v1/token;
{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhc2RmIjoxLCJxd2VyIjoid3dlcnR3ZXJ0In0.didDNTbAieHZd6QezQuJw46qSBjuMR39bZe6eJuMe1c"}

ParseToken:

$ curl -H 'X-Jwtack-Key:12345' http://localhost:36701/api/v1/token/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhc2RmIjoxLCJxd2VyIjoid3dlcnR3ZXJ0In0.didDNTbAieHZd6QezQuJw46qSBjuMR39bZe6eJuMe1c;
{"payload":{"asdf":1,"qwer":"wwertwert"}}

About

JWT acknowledgements as package, coroutine or microservice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages