Subject: [OAUTH-WG] JWT CLI tool in PyJWT

From: Jeff Lindsay <[email-masked]>
Date: Tue, 5 Apr 2011 20:43:04 -0700

We use JWT a lot and end up needing it while using curl, or needing quick
JWT generation... so I added a jwt command line utility in PyJWT. It doesn't
support all crypto methods yet (since PyJWT doesn't either), but it has a
pretty nice interface for encoding/decoding.

You can install it with just "easy_install PyJWT". Here's the usage doc:

Usage: jwt [options] input

Encodes or decodes JSON Web Tokens based on input

Decoding examples:

  jwt --key=secret json.web.token
  jwt --no-verify json.web.token

Encoding requires the key option and takes space separated key/value pairs
separated by equals (=) as input. Examples:

  jwt --key=secret iss=me exp=1302049071
  jwt --key=secret foo=bar exp=+10

The exp key is special and can take an offset to current Unix time.

Options:
  --version        show program's version number and exit
  -h, --help       show this help message and exit
  -n, --no-verify  ignore signature verification on decode
  --key=KEY        set the secret key to sign with
  --alg=ALG        set crypto algorithm to sign with. default=HS256

---

From: Mike Jones <[email-masked]>
Date: Wed, 6 Apr 2011 04:10:44 +0000

(Distributing to a wider audience)

Thanks for letting us know about your implementation, Jeff!

                                                            -- Mike

From: [email-masked] [mailto:[email-masked]] On Behalf Of Jeff Lindsay
Sent: Tuesday, April 05, 2011 8:43 PM
To: OAuth WG ([email-masked])
Subject: [OAUTH-WG] JWT CLI tool in PyJWT

We use JWT a lot and end up needing it while using curl, or needing quick JWT generation... so I added a jwt command line utility in PyJWT. It doesn't support all crypto methods yet (since PyJWT doesn't either), but it has a pretty nice interface for encoding/decoding.

Decoding examples:

Options: