Dave Grijalva
e4a56deada
don't need that
2015-08-18 10:58:37 -07:00
Dave Grijalva
e0b58f1724
MapClaim -> MapClaims
2015-08-18 10:18:57 -07: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
Jamie Stackhouse
ec042acef7
Recommended changes from PR. Plus some documentation.
2015-07-20 09:50:05 -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
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
94cd619027
Switch to Claims interface, tests pass.
2015-07-13 16:14:12 -03:00
Dave Grijalva
3dd0a21a31
move error types and constants out to separate file
2015-04-09 13:20:10 -07:00
Alan Harper
1663b3c6c2
Move errors to variables so they can be matched against
2014-10-20 16:09:02 +11:00
Dave Grijalva
4beb9b5850
gracefully handle a nil keyfunc passed to Parse. (and more tests)
2014-10-11 13:54:16 -07:00
TommyO
e82659ca5b
Updated to accept interface{} as supported by underlying Verify methods.
...
Needed to support precompiled public keys.
2014-09-29 14:00:25 -04:00
Ian Bishop
0c21a058ab
Lowercase error messages
2014-09-08 11:42:58 +10:00
Dave Grijalva
2ef58916cc
return an error if the requested hash method hasn't been compiled in
2014-08-26 15:00:15 -07:00
Dave Grijalva
c9b532b51b
cleanup and documentation updates
2014-08-26 14:18:59 -07:00
Simon Jefford
23cb3af02c
pass keys as interface{} rather than []byte
...
This will allow clients to pass, for example, their own instances of
rsa.PublicKey if the key is not specified as some flavour of X509
cert. For example, Salesforce just specify the modulus and
exponent (https://login.salesforce.com/id/keys )
2014-08-26 14:14:17 -07:00
Dave Grijalva
a95c191bb4
documentation
2014-06-15 19:40:38 -07:00
Dave Grijalva
6174711902
updating documentation
2014-06-15 19:39:12 -07:00
Dave Grijalva
45070d60b9
Merge branch 'master' of github.com:cenkalti/jwt-go
2014-06-15 19:21:25 -07:00
Henry
679bf0f3c9
Fixes #22 - Padding issue in Go1.3 rc1
2014-06-03 16:15:11 +02:00
Cenk Alti
9360809320
indent error flow
...
https://code.google.com/p/go-wiki/wiki/CodeReviewComments#Indent_Error_Flow
2014-06-02 11:28:16 +03:00
Kjetil Mehl
83c2b30a8b
Update jwt.go
...
Hi! I'm using Go 1.0.2 and encountered "src/github.com/dgrijalva/jwt-go/jwt.go:87: function ends without a return statement". This commit returns explicit at the end of the function.
2014-05-22 20:27:05 +02:00
Henry
dea87c4cd8
jwt.ValidationError didn't not implement error
...
I tried to type assert the err from jwt.Parse() and got this
```
./main.go:135: impossible type assertion:
jwt.ValidationError does not implement error (Error method has pointer receiver)
```
this fixes it and makes the Errors field accessible.
2014-05-17 01:18:17 +02:00
Dave Grijalva
aeec1afe95
documentation
2014-03-09 12:26:36 -07:00
Dave Grijalva
a796f21fd5
switched error details to bitfield
2014-03-09 12:24:51 -07:00
Dave Grijalva
aa7f010b16
documentation fix
2014-03-07 14:46:27 -08:00
Dave Grijalva
1a8b763fae
updated parsing errors to provide more feedback
2014-03-07 14:43:11 -08:00
Cenk Alti
fa09d56388
check nbf claim
2014-02-11 22:31:34 -08:00
Dave Grijalva
8de1bb8a61
updated TimeFunc documentation
2014-02-10 17:27:59 -08:00
Cenk Alti
8e74e33063
make time function overrideable
2014-02-05 15:07:40 -08:00
Dave Grijalva
32c540957a
capture raw string when parsing a token
2012-10-02 19:13:21 -07:00
Dave Grijalva
51b517e77a
megabytes
2012-07-07 12:40:24 -07:00
Dave Grijalva
71677efc53
try to get the access_token from the request params as well as the header
2012-07-07 12:38:18 -07:00
Dave Grijalva
224f53452d
fixes
2012-07-07 12:12:49 -07:00
Dave Grijalva
0a26d2272f
gofmt
2012-07-06 17:02:20 -07:00
Dave Grijalva
e84b735fda
made Keyfunc a fixed type so it could be documented more easily
2012-07-06 16:16:34 -07:00
Dave Grijalva
2ed3fe8ded
documentation
2012-07-06 16:12:33 -07:00
Dave Grijalva
5119d0e151
signingn
2012-07-06 16:07:55 -07:00
Dave Grijalva
d736b8f860
added signing support to RS256 and HS256
2012-07-06 15:43:17 -07:00
Dave Grijalva
0008f0b730
gofmt
2012-04-18 12:59:37 -07:00
Dave Grijalva
c416da491f
parse token from http requests
2012-04-18 12:35:16 -07:00
Dave Grijalva
18108cfd38
base64 decoding fixins
2012-04-18 12:18:31 -07:00
Dave Grijalva
2827deb72f
some bad documentation
2012-04-17 23:25:22 -07:00
Dave Grijalva
97424f0088
it works
2012-04-17 22:50:26 -07:00
Dave Grijalva
8853e4547b
framework
2012-04-17 16:58:52 -07:00
Dave Grijalva
28479ff357
check exp time
2012-04-17 16:52:38 -07:00
Dave Grijalva
7a06ac11be
starting to work on it
2012-04-17 16:49:21 -07:00