- Author
Michael "Z" Goddard
- Contact
- Date
Friday, September 9th, 2011
- License
MIT
JSON Web Tokens for Go.
Interface inspired by pyjwt.
goinstall github.com/mzgoddard/gojwt
func queryJwt(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, string(jwt.Encode(
map[string]interface{}{
"iss": 12345,
"request": map[string]interface{}{
"name": "pie",
"description": "triangular shaped piece of baked good",
"delicious": true,
},
},
[]byte("super top secret"),
"HS256",
)))
}