psecio / jwt

A JWT (JSON Web Token) Encoder & Decoder
110 stars 13 forks source link

Specialized Exceptions #4

Closed jschreuder closed 10 years ago

jschreuder commented 10 years ago

Fix for issue #2

Adds a base Exception to be thrown during during decoding/decryption: the DecodeException. Any exception thrown during decoding/decryption can be caught by catching that type. With the exception of the lack of OpenSSL error, that will now throw the more appropriate RuntimeException and is a completely separate type of Exception.

There's also 2 specialized Exceptions: one for expiration and one for failing to verify the header.

jschreuder commented 10 years ago

(oops, only now notice I did the docblock fixes in the master branch and have those pull-requested in both issues now)

enygma commented 10 years ago

Looks great - thanks!