progrium/ruby-jwt — pull request #22 by steved555 (2013-08-26 20:52:17+00:00)
Title: Handle some invalid JWTs

Handles some invalid JWTs found in the wild and outputs a JWT::DecodeError instead of a NoMethodError.

* If the header is nonexistent
* If the header is valid, but the payload is nonexistent
* If the crypto segment is empty