Commit Graph

21 Commits

Author SHA1 Message Date
Tom Anderson 5e00fbc8e7
enable jwt.ParsePublicKeyFromPEM to parse PKCS1 Public Key (#120) 2023-04-17 18:59:03 +02:00
Christian Banse b357385d3e
Moving `DecodeSegement` to `Parser` (#278)
* Moving `DecodeSegement` to `Parser`

This would allow us to remove some global variables and move them to parser options as well as potentially introduce interfaces for json and b64 encoding/decoding to replace the std lib, if someone wanted to do that for performance reasons.

We keep the functions exported because of explicit user demand.

* Sign/Verify does take the decoded form now
2023-03-24 19:13:09 +01:00
Christian Banse 148d710109
`v5` Pre-Release (#234)
Co-authored-by: Micah Parks <66095735+MicahParks@users.noreply.github.com>
Co-authored-by: Michael Fridman <mf192@icloud.com>
2023-02-21 14:32:25 +01:00
George Kechagias 9294af54b5
chore: remove unused claims in RSA table driven test (#212) 2022-06-04 08:03:41 -04:00
Håvard Anda Estensen f6c6299f67
chore: replace ioutil with io and os (#198) 2022-05-27 19:11:16 -04:00
Luis Gabriel Gomez 3258b3fca0
jwt: Add parser benchmarks (#70) 2021-08-03 17:57:36 -03:00
Michael Fridman 2ebb50f957
Adds go module support /v4 (#41)
Additionally, added `staticcheck` for basic static code analysis (#44)

Co-authored-by: Christian Banse <oxisto@aybaze.com>
2021-08-03 15:51:01 +02:00
Sadman Sakib 6a07921e68
Enable go module support for the project (#3)
* initial go module file

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* fix linting issues

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* rename module to golang-jwt/jwt

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* Renamed imports to match with go module name.

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* update travis for latest go versions

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* Set go version to 1.14

lowered the go version to make it consistent with matrix build

* revert accidental changes while renaming

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* remove travis CI

no longer needed since github actions workflow was created for the
project

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* Revert "remove travis CI"

This reverts commit b3ae57f710.

* update travis for older go versions
2021-05-28 21:26:41 -04:00
Joao Aguiar 053ba766a6 Added passoword protect PEM support 2016-11-03 17:50:08 +00:00
Dave Grijalva 011d5bb935 drop support for []byte keys in RSA signing methods 2015-07-20 10:23:11 -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 6a9bcca4b5 moved tests into jwt_test package for better clarity 2014-12-28 12:24:41 -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 652b4be28c make helper methods more specific 2014-08-26 14:24:20 -07:00
Simon Jefford 1363e28b6a expose RSA key PEM parsing funcs 2014-08-26 14:21:38 -07:00
Simon Jefford 33523225e1 can now pass a PublicKey to SigningMethodRSA.Verify 2014-08-26 14:20:56 -07:00
Simon Jefford dc2f34cdb1 can now pass a PrivateKey to SigningMethodRSA.Sign
Conflicts:
	rsa.go
2014-08-26 14:20:28 -07:00
Dave Grijalva 358ed97e4b Merge branch 'wider' into two_point_oh 2014-08-26 13:45:08 -07:00
Dave Grijalva 629af62465 Added support for RS384 and RS512 signing methods
Renamed type SigningMethodRS256 to SigningMethodRSA
Added contstants SigningMethodRS256, SigningMethodRS384, and SigningMethodRS512 to support each of these methods
Added simple tests to support these new methods
2014-07-05 15:34:31 -07:00
Dave Grijalva 97430c0b8b cleaned up and flattened RS256 implementation 2014-07-05 15:25:29 -07:00