Skip to content

mzgoddard/gojwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoJWT

Author

Michael "Z" Goddard

Contact

mzgoddard@gmail.com

Date

Friday, September 9th, 2011

License

MIT

JSON Web Tokens for Go.

Interface inspired by pyjwt.

Install

goinstall github.com/mzgoddard/gojwt

Example

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",
  )))
}

About

JSON Web Tokens for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages