Commit Graph

212 Commits

Author SHA1 Message Date
Dave Grijalva 2b0327edf6 added support for none, hopefully in a way you can't use accidentally 2015-07-22 13:49:41 -07:00
Jamie Stackhouse ddfa84b397 Changed test to explicitly show that you can change the map without type
asserting every call.
2015-07-22 13:53:37 -03:00
Jamie Stackhouse 6f536a0d2d Changed example to use Output test. 2015-07-22 13:48:42 -03:00
Jamie Stackhouse aa6ac13a18 Changed default "New" to use NewWithClaims internally. 2015-07-20 14:47:34 -03:00
Jamie Stackhouse 22cba44699 Moving claim information into claims.go 2015-07-20 14:38:26 -03:00
Dave Grijalva bcde77e55b added rsa change to version history 2015-07-20 10:25:27 -07:00
Dave Grijalva 011d5bb935 drop support for []byte keys in RSA signing methods 2015-07-20 10:23:11 -07:00
Jamie Stackhouse 15b4825280 Add example to migration showing new usage of Parse(WithClaims) 2015-07-20 13:25:55 -03:00
Jamie Stackhouse b00e282378 Update README with some migration information. 2015-07-20 13:20:18 -03:00
Jamie Stackhouse ec042acef7 Recommended changes from PR. Plus some documentation. 2015-07-20 09:50:05 -03:00
Jamie Stackhouse 3eddded2f3 Adding additional bits to mask for various validation errors. 2015-07-17 16:40:52 -03:00
Jamie Stackhouse a6f24f4cf0 Update Claimer -> Claims, update Claims struct -> StandardClaims. 2015-07-17 15:59:18 -03:00
Jamie Stackhouse dfdafab9a7 Update, use MapClaim by default. 2015-07-17 15:55:06 -03:00
Jamie Stackhouse a33fdf927a Going through and updating tests to pass.
Still need to add a test that utilizes the defaults of the structured
object.

Update Cmdline app

Update package reference for PR.

Update examples
2015-07-17 15:14:04 -03:00
Jamie Stackhouse 44718f8a89 Structured Claims object!
Only verify claim if it isn't a default value.

The alternative here would be to use pointers in the Claims structure then we
would know which were nil, or if they were explicitly set to zero in the
claim section

Updated MapClaim implementation to check for existance of keys before
using them.

If they don't exists, validation functions simply return true.
2015-07-17 15:13:59 -03:00
Dave Grijalva 9fe8afe96d version notes for 1.3.0 2015-07-16 14:10:27 -07:00
Dave Grijalva e5cb38552f Merge pull request #74 from patbaker82/ecdsa
Add ECDSA signatures
2015-07-16 14:04:19 -07:00
Dave Grijalva 0efa026231 Merge pull request #72 from patbaker82/rsapss
Add RSASSA-PSS signatures
2015-07-16 14:02:47 -07:00
Patrick Baker c6092083d4 Add RSASSA-PSS signatures 2015-07-16 16:57:46 -04:00
Patrick Baker bf3befad72 Add ECDSA signatures 2015-07-16 15:41:02 -04:00
Jamie Stackhouse febded4195 Added a few new methods to use custom Claims structs.
Must implement interface Claims, which means there is a Valid method.
2015-07-14 14:34:09 -03:00
Jamie Stackhouse fa9a0b8c45 Add validation error bit for generic validation error. 2015-07-14 14:31:32 -03:00
Jamie Stackhouse 94cd619027 Switch to Claims interface, tests pass. 2015-07-13 16:14:12 -03:00
Dave Grijalva 2e53eb673c dropped go v1.2.2 from travis ci config. it's missing some of the things required 2015-06-02 15:39:46 -07:00
Dave Grijalva 2c5741b3e7 Merge branch 'dg/travisci' of github.com:dgrijalva/jwt-go into dg/travisci 2015-06-02 15:31:19 -07:00
Dave Grijalva fa34eafcec .travis.yml (not json) 2015-06-02 15:31:04 -07:00
Dave Grijalva 919016a560 Add travis CI tag to README.md 2015-06-02 15:05:49 -07:00
Dave Grijalva ceceae9e6c added travis ci file 2015-06-02 15:02:28 -07:00
Dave Grijalva 5ca80149b9 added reference to gopkg.in 2015-04-20 13:43:07 -07:00
Dave Grijalva 38ff32c7bf Merge pull request #60 from glkz/master
Fix variable name in parse and verify example
2015-04-17 14:20:58 -07:00
Dave Grijalva e430b188c0 use pre-parsed rsa key for rsa benchmark and make sure signing actually succeeds 2015-04-11 14:04:22 -07:00
Dave Grijalva c0c67af490 cleaned up benchmarks 2015-04-11 13:53:09 -07:00
Dave Grijalva 901c439dfe added benchmark for hmac signing 2015-04-11 13:31:06 -07:00
Mustafa Altun 211399e41a Fix variable name in parse and verify example 2015-04-10 15:31:30 +03:00
Dave Grijalva 3dd0a21a31 move error types and constants out to separate file 2015-04-09 13:20:10 -07:00
Dave Grijalva c48cfd5d97 Updated README
... to discuss recently published vulnerability
2015-04-01 11:06:36 -07:00
Dave Grijalva 61124b62ad Merge pull request #54 from thatderek/patch-1
Updated token creation example to use the proper method.
2015-01-26 13:04:01 -08:00
thatderek c5c16083c7 Updated token creation example to use the proper method.
Example broke with error `undefined: SigningMethodHS256`. Edited to use jwt.SigningMethodHS256
2015-01-25 01:25:58 -05:00
Dave Grijalva a3e2f13bb7 added documentation for HMAC Sign method 2015-01-13 21:33:50 -08:00
Dave Grijalva fb5e9d4418 updated ExampleNew with correct key type 2015-01-13 21:31:08 -08:00
Dave Grijalva 7c18dce7b8 Merge branch 'master' of github.com:dgrijalva/jwt-go 2015-01-07 09:54:51 -08:00
Dave Grijalva 7597fd422d added a test condition 2015-01-07 09:52:08 -08:00
Dave Grijalva 7b97402710 Merge pull request #47 from kofalt/master
Fix timing side-channel attack in hmac comparison
2014-12-28 17:36:52 -08:00
Nathaniel Kofalt 9a3c6fd1e3 Fix timing side-channel attack in hmac comparison 2014-12-28 19:31:54 -06:00
Dave Grijalva d9679c1420 added some examples of unpacking errors from the bitfield 2014-12-28 12:44:46 -08:00
Dave Grijalva db4251f9dd added examples 2014-12-28 12:24:54 -08:00
Dave Grijalva 6a9bcca4b5 moved tests into jwt_test package for better clarity 2014-12-28 12:24:41 -08:00
Dave Grijalva 93e34196bb Merge pull request #46 from albrow/use-signing-methods-directly
Reference signing methods directly instead of by a string name
2014-12-28 11:53:36 -08:00
Alex Browne bfe701fdf5 When possible, instead of identifying signing methods by string, pass
them in directly by name. This is less error-prone and avoids an unnecessary
map lookup. Also encourage this type of usage by using it in the README.
2014-12-27 14:14:23 -05:00
Dave Grijalva 47b263f020 Merge pull request #38 from BugHerd/var-errors
Move errors to variables so they can be matched against
2014-11-03 13:11:22 -08:00