johnsheehan/jwt — pull request #3 by woloski (2013-03-21 14:52:44+00:00)
Title: Support for audience, issuer and expiration check + unit tests

Added support for

* Audience check (`DecodeToObject(jwt, secret, audience: "foo"`)
* Expiration check (`DecodeToObject(jwt, secret, checkExpiration: true`) `default: false`
* Issuer check (`DecodeToObject(jwt, secret, issuer: "bar"`)

I kept it backward compat but added an override that takes the secret as a `byte[]` instead of a `string`. This is a common practice, since you don't know how those bytes were encoded (you are currently assuming UTF8), specially in interop scenario. All the checks are done optionally and are turned off by default as well.

Let me know if this is ok and if you can publish latest to NuGet so I can take the dependency.