Skip to content

Instantly share code, notes, and snippets.

package main
import (
"database/sql"
"log"
"github.com/xo/dburl"
)
func main() {
ken@ken-desktop:~/src/go/src/github.com/knq/jwt/cmd/jwt$ echo "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJleHAiOjEuMzAwODE5MzhlKzA5LCJodHRwOi8vZXhhbXBsZS5jb20vaXNfcm9vdCI6dHJ1ZSwiaXNzIjoiam9lIn0.KWZEuOD5lbBxZ34g7F-SlVLAQ_r5KApWNWlZIIMyQVz5Zs58a7XdNzj5_0EcNoOy" |./jwt -dec -alg HS384 -k ../../testdata/hmac.pem |jq '.'
{
"header": {
"alg": "HS384",
"typ": "JWT"
},
"payload": {
"exp": 1300819380,
"http://example.com/is_root": true,
"iss": "joe"