7kaji / jwt-qrcode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jwt-qrcode

run

$ go run main.go

generate QR code (JWT)

$ curl -s \
       -X POST \
       -H "Content-Type: application/json" \
       -d '{"item_code":"ITEM123", "price":100, "amount":2}' \
        http://localhost:8080/generate_qr > output.png

verify jwt

$ curl -s \
       -X POST \
       -H "Authorization: Bearer [Your_JWT_Token_Here]" \
        http://localhost:8080/verify_token |jq .
{
  "message": "Successfully authenticated!"
}

About


Languages

Language:Go 100.0%